|
-
Oct 12th, 2008, 08:27 PM
#1
Thread Starter
New Member
Set to Deafault, loads the program but wont load the file
I made a word proccessor much like notepad, however when i set my wordproccesser.exe as default for txt files or rtf's and i try to open that file by double clicking, it doesnt load. I use vb 6.0 can someone help
-
Oct 12th, 2008, 09:06 PM
#2
Re: Set to Deafault, loads the program but wont load the file
How exactly did you set/associate your exe to txt/rtf files? Maybe that was not done correctly? And what doesn't load? The application? Or does the app load, but the document doesn't display in it?
-
Oct 12th, 2008, 10:25 PM
#3
Thread Starter
New Member
Re: Set to Deafault, loads the program but wont load the file
I made the exe using vb then i right clicked a txt file i located on my desktop and click open with... browse then my exe. The program opens perfectly but doesnt load the txt file i just tried to open
-
Oct 13th, 2008, 12:43 AM
#4
Re: Set to Deafault, loads the program but wont load the file
In your Form_Load event process a VB variabled named Command$. That variable if not a null string (i.e., <> "") will be the file that was sent. Therefore, the code should look something like:
Code:
Private Sub Form_Load()
....
If Command$<>vbNullString Then
' load Command$ into your editor. Command$ is full path & filename
Else
' user opened your app directly without any associated file
End If
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|