Click here to Skip to main content
15,886,815 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
im working on a window form. im able to load the data from database to my form. my form have a unique text box and a button. the text box contain filename & address of file in system "D:\DEEPAK RAJ\file.txt" and button able to open the file. but i want to add a if statement on form load event if file not found on address which is show in textbox system return a message "File not found". Thanku
Posted
Comments
dan!sh 17-Apr-15 4:42am    
Have you had a look at OpenFileDialog?

Read the documentation here : How to: Determine if a File Exists in Visual Basic[^]
 
Share this answer
 
File class will help you to check if a file exists:
https://msdn.microsoft.com/en-us/library/system.io.file.exists(v=vs.110).aspx[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900