Click here to Skip to main content
15,844,673 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hey guys,

i am making a programming language and i need to know something. i am going to write a code that does this.

when you drag the txt file over the modules exe file and then it reads the file. it breaks it up into tokens and then analyses the token. i know how to do all of that except i don't know how to do the first part, drag the txt file on the exe file and for the module to read the txt file.

can you please give me an example on how to read the text file.

thanks in advance,
Fletcher
Posted
Comments
Member 8378691 6-Apr-12 4:04am    
i cant really post a comment on solution 1, but this isn't what i wanted for readers out there. what i actually want is that you drag and drop the text file on the module "exe" file and the module reads the file that has been droped on it.

1 solution

Start here for drag and drop: Drag and Drop files from Windows Explorer to Windows Form[^]

Reading a file is easy:
VB
Dim fileText As String = File.ReadAllText(path)
Or
VB
Dim lines As String() = File.ReadAllLines(path)
 
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