|
-
Mar 5th, 2004, 09:31 AM
#1
Thread Starter
Fanatic Member
Please solve this!!
Say, I have developed an application which opens a text file. it reads a text file and displays it to the user on a form and does various tasks.
Now, I want to open every txt file using my application whenever the user double clicks the file in the windows explorer.
pls guide.
-
Mar 5th, 2004, 10:37 AM
#2
PowerPoster
Hi,
Why do it in windows explorer? You can do it perfectly well using the OpenFileDialog control from the ToolBox. (Which looks like Windows Explorer anyway!)
Last edited by taxes; Mar 5th, 2004 at 10:49 AM.
Taxes
The more I learn about VB.NET the more I like dBaseIII Plus
The foregoing, whilst believed to be correct, is given without guarantee as to it's accuracy and entirely without recourse. You are required to decide for yourself whether or not it is suitable for your purposes and no liability for loss of any nature can be entertained.
-
Mar 5th, 2004, 11:38 AM
#3
Frenzied Member
I'm not sure how to associate extensions with an app in code, although it probably wouldn't take much searching to find a way, but a user can easily do it manually.
-
Mar 5th, 2004, 01:22 PM
#4
Sleep mode
Associating your program with specific ext can be easily done while making setup project for your application .
Or
by API .
-
Mar 5th, 2004, 09:00 PM
#5
Look in HKEY_CLASSES_ROOT at how the file extensions are created and use your program to simply add the required registry keys and strings to associate the files with your program.
I use Microsoft Visual Basic 2005. (Therefore, most code samples I provide will be based around the .NET Framework v2.0, unless otherwise specified)
-
Mar 5th, 2004, 10:55 PM
#6
Frenzied Member
I'd go with Pirate. I forgot you could do it in setup, although to be nice, you should ask first.
But, now you've got leads on 4 or 5 ways to do it
-
Mar 6th, 2004, 03:51 AM
#7
Thread Starter
Fanatic Member
is it something related to commandline argument??
like, say, my application name followed by filename
c:\MyApp.exe Text1.txt
??
-
Mar 6th, 2004, 04:07 AM
#8
Yeah the filename goes into the command part of the path. To get the file name, use X = Command in the Form_Load sub. I'm pretty sure it displays the full path so all you'd really have to do is call the sub that loads the files and it would do it automatically when it first loads up.
I use Microsoft Visual Basic 2005. (Therefore, most code samples I provide will be based around the .NET Framework v2.0, unless otherwise specified)
-
Mar 6th, 2004, 06:11 AM
#9
Thread Starter
Fanatic Member
i am bit confused.
can u provide me with an example?
what settings i have to do in my project properties?
thanx in advance
-
Mar 6th, 2004, 06:15 AM
#10
Sleep mode
File Types Editor view . Check out MSDN howto .
-
Mar 6th, 2004, 06:24 AM
#11
Thread Starter
Fanatic Member
pirate, i am searching for it.
btw, could u please solve my query at the following link:
Please solve this!
didnt receive any help from anybody yet. its urgent.
thanx in advance
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
|