In this video tutorial I will show you how exactly to use the Open File Dialog and the stream reader to read text inside a saved text document and load the text inside the saved text document into a text box inside your MS Windows Application.
SIMPLE DETAILED TUTORIAL
UserIsAnFBIAgent On YouTube.
Would you like to make a Donation to UserIsAnFBIAgent On YouTube?
Ok. That works all well and good. But how do I handle the file not found exception that comes up if I abort opening the file? I mean if I click the button and then x out of the open file dialog box the program crashes. What do I need to add to make the program not crash if the user opens the openfiledialog but then chooses not to open a file? Any help on this would be great.
opsssss
tinku710 2 months ago
This is cleanest screen capture i ever seen.
mw43al 3 months ago
@Designartseller Wrap it in Try things. Ex
Try
Send.Blah
Get.Blah
Open.Blah
catch ex as exeption
end try
GreysonSquad 6 months ago
Ok. That works all well and good. But how do I handle the file not found exception that comes up if I abort opening the file? I mean if I click the button and then x out of the open file dialog box the program crashes. What do I need to add to make the program not crash if the user opens the openfiledialog but then chooses not to open a file? Any help on this would be great.
Designartseller 6 months ago
@runningkiller
hmm. maybe rename Textbox1 to Text Lolzor ( noob?)
G00dFight1996 7 months ago
Does not work Help pls it says that TheText.Text is didn t Decleared Help.
runningkiller 8 months ago
thnx
ABABAB542 1 year ago
Thank you so much! You're a great help for CIS students!!
stevicerated 1 year ago
How would you open a file that has two lines for two different textboxes?
late7 1 year ago
thnx man
varmavee 1 year ago