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:

JuggaloBrotha

VB.NET Forum Moderator
Staff member
Joined
Jun 3, 2004
Messages
4,524
Location
Lansing, MI; USA
Programming Experience
10+
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
 
Top Bottom