Forms :: Edit Line In RTB?

Mar 4, 2010

I have RTB witch I can edit with text by using .

RichTextBox1.text = RichTextBox1.text & "stuff" & VbcrLf

Great but I loose any editing to colour/font I may of done previously. Is there a way of just adding a new line. I am thinking along the lines of finding the last character then adding my new line.

View 5 Replies


ADVERTISEMENT

VS 2010 : RichTextBox Edit Line By Line, Keeping The Formatting?

Jul 7, 2011

I want to loop the lines of my RTB and add a vbTab on each line.How do i do this?

View 1 Replies

Edit / Read TextBox Line By Line?

Oct 10, 2011

Im trying to create a program which can edit/read the textbox line by line.[code]...

View 1 Replies

Edit A Line In A .ini File

May 31, 2010

I want to edit a certain line in a .ini file like this, the line is MSAA=0..I want to change the value of that number but first I need to find out how to get there. I really need help with this. I dont know if I should use steam reader and writer. If I can use those how can I find the line persay 15th line..

View 4 Replies

Delete Or Edit Line In TextFile?

Dec 11, 2010

I have a program that reads a text file tab delimted using OLEDb I need to be able to allow the user to insert a user created record into the file which I can do. The problem is I need to be able to let the user edit that record. From my understanding you can not edit or delete with OLEDB only insert So I thought I would read the file using stream reader, find the line I want to edit and just delete it, rewrite the file, then let the user insert a new record?

Dim strDelimiter As String = vbTab
OpenFileDialog1.InitialDirectory = "C:\"
OpenFileDialog1.Filter = "Text Files (*.txt)|*.txt"

[code]....

View 1 Replies

How To Edit Line Values Within ListBox

Jan 16, 2012

I am loading a listbox with lines from a txt file. Now I would like to be able to edit values within that listbox by going there with the mouse cursor and type a new value..

E.g. the listbox displays:
7226218; Hemlock; 22.55; 4
0822722; Pine, Sugar; 11.55; 7

After editing it looks like:
7226218; Hemlock; 22.55; 2
0822722; Pine, Sugar; 11.55; 7

After pressing an "accept button" those values should then be written back to the txt file.

View 9 Replies

Changing Flags - Edit Line Within INI File

Dec 11, 2009

I am trying to speed up the process of changing flags within an INI file used for a program. Ideally i want a simple form with ON/OFF radio buttons which are specific to different options within the ini file. For example, if i wanted to turn Printing off in the ini file, i could select OFF for which this will edit the ini file and change the setting "Printer=0"

Code:
Dim file As System.IO.File
Dim reader As System.IO.StreamReader
Dim line As String
Private Sub RadioButton1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton1.CheckedChanged
[Code] .....

View 4 Replies

Deleting A Line From Text File Using Edit?

Jun 21, 2010

Ok so i have a uni assignment to delete lines of text out of a text file, so far i have figured out how to search the text file for specific bits of text, i,e name of user, ive also used a loop to find out what line in the text file the specific line exists as...my

code so far is
Dim line As String
Dim Input As StreamReader

[code]....

the selected policy is what im tryin to use to write over the line of texts that already exists however i think that maybe instead of deleteting what exists it will just move it down a line and make a blank line

View 3 Replies

VS 2008 Edit Specific Line Of Text In A File?

Apr 30, 2009

I am trying to make the code edit the a line in a text file, but it ends up deleting all the text and add the line at the begging of the file.

Dim FILE_NAME As String = "config.conf"
Dim i As String
Dim Text(90) As String

[Code].....

View 3 Replies

Edit And Paste Mutliple Line Text Into A Single Cell?

Nov 25, 2009

How can I paste a multiple line text into a single cell?I tried sendkey {F2} but Excel does not run macro in edit mode.

View 1 Replies

Forms :: Read Textbox Line By Line?

Nov 17, 2009

I have a multiline textbox from which I would like to read each individual line and store it in an array. I don't want to store each carriage return, I want the line itself.I have been using this, but it only records lines followed by carriage returns.

Dim arra() = txtReceipt.Text.Split(Environment.NewLine)

Here is a visual example: [URL]From that top right textbox, I would want arra(0) to be "Type some stuff here (and hit the return and" and arra(1) to be "tab keys...)"

View 4 Replies

Add / Edit Mode For Forms?

Sep 10, 2010

When in "Add" mode, I have all controls on the form enabled with the exception of a listview that is disabled until the record is saved. The listview needs the primary key from the saved record in order for items to be added to the listview.

When in "Edit" mode, the form is populated when a record is selected on a search form. Specific controls are disabled. When a value in a control is changed, I have a RecordModified property that is set to True and then the Save button is enabled. I also have combo boxes that need to be populated but the selected value needs to correspond to the value pulled from the database

View 6 Replies

Edit Sql Database Using Forms?

Apr 12, 2010

I'm trying to edit my sql database using VB Forms.I went ahead and connected my database to VB and I see how to pull data from my database to VB, but I'm not understnading how to use a form to add/edit/delete data from the database.Basically I would be looking to add to a table:

Table Name: People
Row 1: First Name
Row 2: Last Name

Edit would be the same type of thing except I think I would pull the data from the database to populate a table, than how would I save the changes after I changed the information To delete I'm assuming would be similar to edit I would simply pull the data from the database than using a delete button would delete it.What I don't understand is how to create the SQL statement in VB so that it'll execute it properly in my database.

View 10 Replies

Forms :: Command Line Args In Windows Forms?

Aug 2, 2010

I was playing a game recently and saw that they could use args in the shortcut, and I decided to try to impliment this into my application...so far, I got: (runs this sub on load)

Sub startup_args()
If Environment.GetCommandLineArgs.Contains("+game") Then
Dim path As Array = Environment.GetCommandLineArgs

[code]....

just to see what it returns, but the application crashes. I also tried path.tostring(), but that didn't work. When I did:

If Evnironment.GetCommandLineArgs.Contains("+game") Then
Dim path as string = Environment.GetCommandLineArgs.tostring
MsgBox(path)

[code]....

but that returned the value "SString.Array[]"...

View 7 Replies

VS 2010 : Share And Edit Variables Between Forms?

Jul 7, 2011

how to share and edit variables between forms? I want the user to be able to enter a value into a textbox and the program store it and then load another form and do calculations and display answers but I can't get it to work.

View 2 Replies

DataGridview Edit,Update,Insert In Windows VB Forms?

Sep 18, 2009

I am working in VB.NET windows forms and dealing with DataGridView.I have populated that DataGridView with the DataSet through wizard. How to Add , Delete and Edit/Update the records of the DATAGridview back to the DataBase..I am using MS Access as the Database....I am using Windows Forms application not the WEB application...

View 4 Replies

Forms :: Setting DataGridView Cell In Edit Mode

Oct 26, 2009

I'm having trouble with setting a datagridview's cell in edit mode, or rather, to let the user type some input on load of a form (as in Excel or the like).

This is my code (after the dgv has been filled):
dgvTentander.EditMode = DataGridViewEditMode.EditProgrammatically
'(or dgvTentander.EditMode = DataGridViewEditMode.EditOnEnter)
dgvMyDGV.CurrentCell = dgvMYDGV.Rows(lastrow).Cells(TeCOL_Quant)
dgvMYDGV.BeginEdit(True)

The code correctly indicates that the cell is selected, and when the page is loaded I can still se the cell selected, but the cursor doesn't appear and nothing happens when I type.

View 3 Replies

Forms :: Copy RichTextBox To An Array Line-by-line And Back To Another RTB From That Array?

Sep 6, 2009

How to copy RichTextBox to an array line-by-line and back to another RTB From that array?

View 2 Replies

Get Forms App To Run Like Command Line App?

May 3, 2011

I have a forms app that contains a few forms. My task is to make it run invisibly when called from the command line with arguments.I have defined a Sub Main in a module and made it the startup item. I have an if/then/else that looks at args.length and if it equals 0 then I load the form and run the app normally. But how do I handle things when args are passed? I still need access to all the functions defined in my main form. Can I load the form invisibly and still "use" it?

View 14 Replies

File I/O And Registry :: Show The Content Of The Dnsredir.ini File On The Forms And Able To Edit It?

Dec 17, 2008

What i am trying to do now is to show the content of the dnsredir.ini file on the forms and able to edit it.

The dnsredir.ini file file looks like this

;Configuration INI file for DNS Redirector v6.4.7
Logging=Normal
ListenOnIP=172.23.128.33

[Code]......

View 1 Replies

Forms :: Display Data In Grid View Using Code That Can Edit, Update And Delete The Data?

Oct 6, 2011

how to display data in grid view using code that you can edit, update and delete the data...do i need to have a stored proc in this?

View 4 Replies

Data - Add An Edit Button That Will Edit Existing Entries?

Apr 28, 2010

I have a form that adds new contacts. New contacts are added by pressing an appropriate button and they appear as an entry in the list on the form. I try now to add an edit button that will edit existing entries.User will select a given entry on the list and press edit button and will be presented with an appropriate form (AddContFrm).Right now it simply adds another entry with the same title. Logic is handled in a class called Contact.vb Here is my code.

Public Class Contact
Public Contact As String
Public Title As String[code]....

View 1 Replies

Forms :: Streamwriter Writes To A Specified Line#?

Sep 30, 2009

I am needing to write to a "rtf" file, and always insert my text on line 3 of either a new or an existing rtf document.I'm familiar with vb, but have not done much with the system.io functions. I have been testing several examples from the internet using the streamreader and streamwriter but still having issues finding a way to "insert text" on a specified line number. My questions:

1)I will always need to write on line #3, do I need to read all lines as this example shows "lines.AddRange(System.IO.File.ReadAllLines("C :/test/myrtffile.rtf"))"

[code]....

View 4 Replies

Deleting A Text Line In Windows Forms Project

Jan 10, 2011

I am busy with a project converting VS2005/2008 sln files.

I am quite far but have came acroos a problem with my source code.

I have found the files I need to change, I have changed them to the version that I need.

I now need to read the files back into my program and delete the line I have changed as it contains project numbers that are irrelevant. Then I need to save it.

I have got as far where I have searched for lines that begin with 'Project'. I have changed this also so it's now a question of reading the files in, Deleting the line with the 'Project' number and saving them.

[Code]....

View 1 Replies

Forms :: Command Line Like Interface In A Windows Form?

Jun 27, 2010

I am working on an application and I want the user to be able to enter commands into a textbox, and when they press enter, the command is printed in a rich text box, executed, and the output is printed. For instance: the user types move{file1}, {location} into the text box and this happens:

>command: move{file1}, {location}
>$ moving file1 to location
>job completed

How would I write lines to the rtb and execute commands when the enter key is pressed?

This works, partly.
Private Sub TextBox1_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles command.KeyPress
If e.KeyChar = Microsoft.VisualBasic.ChrW(Keys.Return) Then
RichTextBox2.Text = Environment.NewLine + command.Text
End If
End Sub

it erases everything in the textbox before adding the line... I would also like to be able to make a database of commands, maybe a .dll or something, so that when the user types in something, it checks that database to see if the command exists, if it does it executes, if not, error.

View 1 Replies

Forms :: Command Line, Hide Console And Get Feedback?

Jan 17, 2010

I am working in VB. I have a fairly long and detailed explanation that I'll avoid posting but what I'm looking to find is quite simple. I'm looking for information how the command line executable LAME.EXE (the Mp3 encoder) returns information to the host program/form.

I am a VB novice and a novice to programming in general and am looking to learn more about as much as I can on the whole but basically I have a Windows form that gathers all the necessary information as a front-end:

The input .wav file path
The output .mp3 file destination

The encode settings (bitrate, frequency, etc)This information is pooled in to a string like this: lame.exe -v -b 112 input.wav output.mp3 or any variant on the settings selected in the GUI which is then in turn used to execute LAME.EXE with the set of parameters in a command line console...That's all well and good and it is quite functional but what I'm looking to do is to 'hide' the console in itself and have the encoder feed back its progress, say as a percentage inside the GUI.

The problem is that it doesn't appear that LAME in itself has this kind of functionality explicitly built in. I know it's possible however, as every single front end in the world has this functionality.I have tried a few ways of doing this with avoiding the issue of not being able to find the functionality within the codec. Perhaps I'm looking in the wrong place entirely or I'm not thinking correctly 'outside the box' as it were.

what I'm looking for is to use a command like this within the script itself: lame(v,b,112,"C:input.wav","c:output.mp3") or even pass the parameters obtained from the GUI a string formatted dynamically on the fly itself.I expect of course that this kind of functionality won't be available anywhere at all, what I'm really looking for as a workaround that reports the actions/progress/console output of the executable back in to the VB program somehow.

View 1 Replies

Forms :: Redirecting Console To Textbox, Last Line Not Included?

Jun 14, 2011

Private Sub StreamInput(ByVal Text As String) m_Process.StandardInput.WriteLine(Text)
m_Process.StandardInput.Flush()
End Sub
Private Function ConvertFromOem(ByVal Text As String) As String
Return _

[Code]...

View 3 Replies

Forms :: Run A Command Line Script From Within Winforms Application

Jul 19, 2010

I am writing an application in which a user is doing a file conversion. I have a set of tools that can perform the conversion on the fly via command line, but I'm not entirely sure of how to go about passing the parameters I need to the command line and running them. Can someone point me to the right direction?Would I just create a System.Diagnostics.Process and use that? If so how do I do the line by line command? For instance if I need to issue a cd command to change the directory and then execute a command after that how would I do that?

View 1 Replies

C# - Text Of A System.Windows.Forms.GroupBox Wraps To The Next Line?

Mar 12, 2010

I'm creating a GroupBox at runtime and setting its Text property. Usually, the text is only on one line, but sometimes it wraps. The problem is that the controls contained in the GroupBox cover up the GroupBox's text.

What I'd like to do is determine if and when the text wraps. Specifically, I'd like to determine how much extra height the wrapped text takes up as compared to a single line. That way, I can reposition the GroupBox's controls and adjust its height.

Initially, I thought I'd do this by calling the GroupBox's CreateGraphics() method, and using the Graphics to measure the string. Something like this:

[Code]...

The problem is that the size generated by g.MeasureString(text, grp.Font) doesn't seem to be accurate. I determined that it wasn't accurate by putting enough of a single character to cause a wrap, then measuring the resulting string.

For example, it took 86 pipes (|) to until a wrap happened. When I measured that string, its width was ~253. And it took 16 capital W's to force a wrap - its string had a width of ~164. These were the two extremes that I tested. My GroupBox's width was 189. (a's took 29 and had a width of ~180, O's took 22 and had a width of ~189)

View 3 Replies

What This Line Means - Inherits System.Windows.Forms.Form

Mar 20, 2009

What this line means? Inherits System.Windows.Forms.Form

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved