Open a file into my application

grags

Active member
Joined
Mar 26, 2005
Messages
26
Programming Experience
Beginner
I've written a notepad application, what i'm looking for is some code that will allow me to open a file directly into my note editor, without having to open the note editor first.

Any code or a link would be greatly appreciated :D
 
Last edited:
VB.NET:
Dim strStartupArguments() As String = System.Environment.GetCommandLineArgs
'Call your open file sub and send it:
strStartupArguments(1)

what this does is get the commandline arguments that were passed at startup of your app. the first one in strStartupArguments is always the application path it'self so the 2nd one would be the path of the file that you can have your application open at startup
 
Back
Top