Write in exist text files VB.net
Today I will tch you how to write in text files (.txt) using VB.Net. Let´sgo :D
How to crte a project in Visual Studio?
Exists many ways to crte a new project in VS. For example, when you open your VS program, in theStart Pageyou will see the optionNewProject ...
Start in the Form
In the form, add aTextBox(orrichtextbox) to place the text from the file. The textbox should supportMultiLine. You can enable it in the Properties of the textbox or using like I will show in the example. Center it in the form. Also we need a Button.
The …
PressControl + Alt + 0to open the page.
PrivateSubForm3_Load(senderAsObject, eAsEventArgs)HandlesMe.Load
EndSub
Now do the same to the button. Select in the leftButton1and in the right sideClickor more simple do double-click in the button in the designer.
PrivateSubButton1_Click(senderAsObject, eAsEventArgs)HandlesButton1.Click
TheSystem.IO.StrmWriter, does not work only in.txt files, but also in other tipes like.inf or.ini and others. If the file is supported by the Notepad of it will also open if you use my this method. Is important use the
No comments:
Post a Comment