VS 2010 : RichTextBox Write Text?
Mar 18, 2011
i make a
TextBox1.Select()
TextBox1.Paste("hello")
This code write "hello" in the textbox1, how make in the RichTextBox = ?I write
RichTextBox1.Select()
RichTextBox1.Paste("hello")
and dont work.
View 2 Replies
ADVERTISEMENT
May 26, 2011
Currently i can write a .res file through richtextbox.text it writing wonderfully......but the program conataing the .res file is not working in windows if i write it through word pad and save it as menu.res it work
just i want to do this work by a software....in vb.net i m using richtextbox ,openfiledialogue,textbox & a button
[Code]...
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
My.Computer.FileSystem.WriteAllText(TextBox3.Text, RichTextBox1.Text, True)
End Sub
View 1 Replies
Mar 8, 2011
I'm trying to have a feature in my application where every time the user presses the "-" key the word directly before it becomes bold. This much I've been able to figure out:
[Code?
View 4 Replies
Jan 7, 2011
I've decided to come back to working on an old program of mine, and it's been coming along nicely, but there's this one thing that I can't get working.I have formatting options (Bold, Underline, Italics, Strikethrough) available on my program, and they all work properly. I'm giving users the ability to export all of their text from a single page on the program to a .rtf file. However, the problem I'm experiencing is that each page has numerous RichTextBoxes on it, so I cannot simply use a RichTextBox1.SaveFile() command or something similar. I want to compile all of the text (including formatting) from all of the RichTextBoxes and put it on a single .rtf file. Currently, I'm getting the text from the RichTextBoxes using the RichTextBox1.Text command; unfortunately, that only gives me plain text without formatting. So, what I'm wondering is: how can I get the formatted text from a RichTextBox? Is there any command?
View 6 Replies
Oct 13, 2010
Say I have certain features that makes some things and prints it into a text box, how do I design some of the text at will? like hare:
----------------------------------------------------------
design
no design
----------------------------------------------------------
(i want to change color,font and bold)
View 31 Replies
Jan 8, 2012
i have this code to select a word in richtextbox.text
[Code]...
i want to select all the word Hello and color it.how can i do that
View 1 Replies
May 30, 2010
I have no problem loading the contents of a text file into a richtextbox(rtb) with the below code. I can then edit and save the contents of the rtb to the file, and clear the rtb.
However, is the file still open? Does loading a text file into the rtb actually open that file? I am asking because I can't find any methods or techniques to close a file that has been loaded into a rtb. Is clearing the rtb the correct procedure?
Public Class Form1
Dim openFile1 As New OpenFileDialog()
Private Sub OpenToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OpenToolStripMenuItem.Click
[code].....
View 1 Replies
Jan 1, 2012
I have a code to get the all html source into a richtextbox but I need display only the body text. This is the code to get the source:
[Code]...
View 2 Replies
Sep 13, 2010
I have big problem with my CHAT app. I want to add smiles but i have some problems. I using transparent Richtextbox, and when i try to use Regex system to replace text with image it work, but everytime other smiles disappearing, i only see last one. Second thing, i want to use GIF animated smiley and this Regex method don't work with all of these my problems. So i need an other way... Can anybody show how to do this
Imports System.Runtime.InteropServices
Public Class TransparentRichTextBox
Inherits RichTextBox
[code].....
View 11 Replies
Jul 11, 2010
I'm trying to write a program that generates a text file, what I want it to do, is based on the length of let's say TextBox1, add asterisks to a file/second textbox like so...I can't seem to work it out in my head how I would go about doing this. I'm assuming I would need to gather the length of the TextBox1, but at that point, I'm lost - Hahahaha, could someone give me a hand with this?
View 14 Replies
Sep 3, 2010
I am encountering a problem when trying to write data to a text file. If I put the output into a messagebox I can see it, but when I attempt to write it to a file it is just blank. What am I missing here? EDIT - This is just a simple winform that I specify a path to a local HTML file in Textbox1 and I'm attempting to parse some HREF tag data.
Imports System.IO
Imports System.Text.RegularExpressions
Public Class Form1
[code]....
View 2 Replies
Feb 27, 2012
How to Get How many Character Can be Write on (Form.Text) in VB.NET
View 3 Replies
Aug 8, 2011
Trying to get a textbox to write the contents to a field within mysql.
View 3 Replies
Feb 8, 2012
I'm trying to implement Bandwidth Total calculation into my little desktop monitoring program using 2 *.txt files. Everything else is working great except for the writing/reading part of it. I had put this together originally without the intention of bandwidth monitoring, but I've decided it would be a good thing to have.I want to have 2 monitoring types: Windows Session Bandwidth Total & All-Time Bandwidth Total (since the program was 1st run on the machine). The counter is on a Timer (2nd of 2), and I want it to write and add the label values each second into the file, then when Form3 is opened, to read the text file and show the results.
View 12 Replies
Jul 25, 2011
I am creating a text editor like notepad. Well its an advance type because it is a tabbed notepad type. It saves html files.
I only created tabcontrol on the design time named TabControl1. the tabpages and the richtextbox are created on the form load and when adding tabs. [code]...
View 7 Replies
Jul 26, 2011
I have 2 forms. The 1 is named frmMain. inside of it is a Richtextbox named RTB.
The other form is named frmInsert. Inside of it is a Richtextbox named rtbtext.[code]..
View 5 Replies
May 4, 2012
How to write data From DataGridView to RichTextBox
View 9 Replies
Dec 27, 2011
I have a trouble making this code work. When executed, it just creates a correct (with the correct name) file with the extension .txt but the the actual text inside .
Imports System.IO
Public Class Form1
Public mytext As String
[code]...
The strange thing is that while debugging, h, t string variables have the correct values, but somehow mystream.write(t) doesnt work (it doesent write anything to my h.txt text file...
View 5 Replies
Jan 28, 2012
It has to be a simple line of code but I do not know how to construct it. Using VB 2010 Express, I have a MDI parent form and many child forms. I want the parent form to determine what child form is active and load data into the RichTextBox1 on the child form. Each Child form has a RichTextBox1. The parent form gets its data by loading a file.
I am close to a solution but just can't get there. You will see in the code below, if I make a direct reference to a specific child form, it works great. What I want to do is to use the Active Form function to determine which form to write to. I have looked at the MS tutorial which gets me close.
Private
Sub OpenToolStripMenuItem_Click(ByVal sender
As System.Object,
[Code].....
View 6 Replies
Jul 11, 2011
My application appends incoming report data onto a RichTextbox control. As more text arrives from an external device, the thumb initially fills the trough and as times goes on, the thumb diminishes in size. This is expected behavior.A modal dialog box allows the user to cancel the file download but since it's modal, the user can't scroll down to see what the last text that was appended.Is there a property/event/method that will show the most recent/last text in the RichTextBox control, rather than the initial text as I have it displayed now? The user would be able to see the text drawn real time without having to use the thumb to accomplish
View 2 Replies
Jun 25, 2010
I'm trying to read a text file that contains info like this:
ACX-101-011 , J2168
BTXR-130A-013, D6733
AJ4-233-614, T8211
I want to split each line at the comma and write the left side to a textbox and the the right side to another textbox. I'm close, with the code below, but I can only post results from the first line in the file. How do I loop this and append the text results in each of the textboxes.
Dim TempFile As String
TempFile = "temp.txt"
Dim sw As StreamWriter
[Code].....
View 2 Replies
Mar 10, 2011
Is it Possible for me to read text from textbox control and write it to .txt file at specific location.
for an instance.... say below with quote is my Text in .txt file:
"THE QUICK BROWN FOX JUMP OVER THE LAZY DOG"
and with programming code I want to change some text in the same sentance become....(see below)
"THE QUICK GREY FOX JUMP OVER THE LAZY CAT"
so you can see the word BROWN change to GREY and word DOG change to CAT
View 7 Replies
Apr 7, 2012
I've been developing a arcade game, and as every good arcade game, it has an incorporated scoreboard so that players can see who scored better. My problem is that everytime it enters a new scoreline, it deletes all the previous lines in the text file. The code I've been using is the following:
If player1 > 25 Then
objReader.Close()
MsgBox("O " + jogador1 + " ganhou.")[code]............
View 2 Replies
Apr 16, 2011
I've got a program which displays data in a listbox in five columns. All are separated using one or more ControlChars.Tab. I want to write these columns to a text file, however, when I do, my columns lose their alignment. I can change alignment so that it displays nicely in text file, but then it is off in list box. Is there a way to get what I see in my listbox to display the same way in a text file - maybe a different way of separating my columns (not using ControlChars.Tab)?
View 7 Replies
Jan 16, 2012
its noobish question but i didnt find any solution for it here is my problem : i want to write bites from 2 seprated file (1.txt + 2.txt) into 1 single file(3.txt) but i cant
[Code]...
View 9 Replies
Aug 9, 2010
I have not been able to "Get" properties of richtextboxes that are in other forms in my MDI interface. I'm creating a document editor which specifically call for a richtextbox for each form. I'm attempting to implement a Find/Find All form, which is why I need to "Get" text from each document by creating a property for each. However, I keep getting "null" erroer messages.
My property structure follows:
Public ReadOnly Property rtb_txt_form() As String
Get
Return Solution.TextForm.RichTextBox1.Text.ToString()
[code]....
View 5 Replies
Apr 21, 2011
i want to some text to appear in a RichTextBox, but after a certain point I want to create a new line of text separate from the original text... Here's what I have:
Private Sub Form11_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
RichTextBox2.Text = "The first line"
RichTextBox2.Text = "The second line" 'I want a new line here
End Sub
View 2 Replies
Nov 6, 2011
[code]I just want it to change item format in listbox (IP: 0.0000.0000.000 PORT: 8080 to 0.0000.0000.000:8080) and write that line to a text file located on desktop!
View 2 Replies
Jan 24, 2010
How to add text to new line in a RichTextBox?
View 2 Replies
Sep 15, 2011
I have a richtextbox and I am adding text to the rich text box programmically using[code]...
How can I program my button to type the text above and then insert variable's value in one line?
View 2 Replies