Click here to Skip to main content
15,889,867 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a text file located in my debug folder that I wish to display in a label. My problem is not displaying the entire text file but to only display the first line in my label. I have read a bit about how to do this but it includes a click button event which I dont desire. I would like it to read when the program loads (in the load event). Is this possible and will I need to create a private sub?
Posted

1 solution

When you read the file, you can read the first line, break out of the loop and then assign this text to the text box.

Is this what you are looking for or am I missing something?
 
Share this answer
 
Comments
Dale 2012 7-Dec-10 0:47am    
Not sure.......could you supply a solution of what you mean?
Dale 2012 11-Feb-11 1:03am    
I do not wish to open the file to read it or read the first line of text in the file. I want to know if its possible to display the name of a specific file in a textbox or label?

thank you in advance....

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