|
-
Dec 4th, 1999, 08:48 AM
#1
Thread Starter
Member
I'm not 100% sure if DDE is the method, but I'd like to pass file information to my small text editor app so that when you double click on a text file, it launches the app and opens the file. Thus far I have been able to make my app the deafult text editing progam, but failed tring to get the file opening functionality to work?
Anyone have any suggestions or know of an API to use to accomplish this?
-
Dec 4th, 1999, 11:50 PM
#2
If you have got windows to launch your app when double clicking on the file, all you have to do is open the file passed to your app in the commandline. Something like this:
Code:
ption Explicit
Private Sub Form_Load()
Dim hFile As Integer
Dim Text As String
If Len(Command) > 0 Then
If Dir(Command) <> "" Then
hFile = FreeFile
Open Command For Input As #hFile
Text = Input(LOF(hFile), #hFile)
Close #hFile
Text1.Text = Text
End If
End If
End Sub
-
Dec 5th, 1999, 05:34 AM
#3
Thread Starter
Member
Thanks a lot. I'll give it a try.
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
|