add explorer file right-click to vb program? 
Author Message
 add explorer file right-click to vb program?
I want to enable my vb app to launch and load a file that's selected by
right-clicking the file in Explorer, a la Winzip and others.  I believe
ShellExecute is involved, and I'll probably need to pass a commandline
argument, but does anyone have any specifics or code examples?

Thanks in advance!

Randall Arnold
t & r designs



Thu, 10 May 2001 03:00:00 GMT  
 add explorer file right-click to vb program?
Utilize the VB variable "Command" within your Visual Basic app.  This will
contain the command line argument passed to your program.  It can be passed
by command line like :    myprog.exe c:\autoexec.bat   ...  In this case,
the "Command" variable will contain the "c:\autoexec.bat"

In addition, to allow Windows Explorer to open the file with your
application, create a file association under the view/folder options/file
types within Windows explorer.  The variable is passed to your application
in the same way listed above...



Quote:
>I want to enable my vb app to launch and load a file that's selected by
>right-clicking the file in Explorer, a la Winzip and others.  I believe
>ShellExecute is involved, and I'll probably need to pass a commandline
>argument, but does anyone have any specifics or code examples?

>Thanks in advance!

>Randall Arnold
>t & r designs



Thu, 10 May 2001 03:00:00 GMT  
 add explorer file right-click to vb program?
Right... I got that much of it.  I'm trying to set up the associations in
the registry via the VB Setup program, so that the user doesn't have to do
it manually.  I'll probably have to shell to an executable that I will
create that creates the key values, etc.  THAT's the part I need help with!

Thanks,

Randy

Quote:

>Utilize the VB variable "Command" within your Visual Basic app.  This will
>contain the command line argument passed to your program.  It can be passed
>by command line like :    myprog.exe c:\autoexec.bat   ...  In this case,
>the "Command" variable will contain the "c:\autoexec.bat"

>In addition, to allow Windows Explorer to open the file with your
>application, create a file association under the view/folder options/file
>types within Windows explorer.  The variable is passed to your application
>in the same way listed above...



>>I want to enable my vb app to launch and load a file that's selected by
>>right-clicking the file in Explorer, a la Winzip and others.  I believe
>>ShellExecute is involved, and I'll probably need to pass a commandline
>>argument, but does anyone have any specifics or code examples?

>>Thanks in advance!

>>Randall Arnold
>>t & r designs



Fri, 11 May 2001 03:00:00 GMT  
 add explorer file right-click to vb program?


Quote:
>Right... I got that much of it.  I'm trying to set up the associations in
>the registry via the VB Setup program, so that the user doesn't have to do
>it manually.  I'll probably have to shell to an executable that I will
>create that creates the key values, etc.  THAT's the part I need help with!

You just need to edit setup1.vbp and re-compile it with your added registry settings.  You can also export the branch from your dev. registry and just include the .reg file in setup.lst (not the recommended approach.)  Of course this will only register specific file extensions.  WinZip and others that affect all extensions are using a special kind of DLL (shell extension.)


Fri, 11 May 2001 03:00:00 GMT  
 add explorer file right-click to vb program?

Thanks, David!  The registry is NOT my forte, so I'll have to muddle through this, but the client really wants this capability in their app.  You've given me a good start!

Randy



    >Right... I got that much of it.  I'm trying to set up the associations in
    >the registry via the VB Setup program, so that the user doesn't have to do
    >it manually.  I'll probably have to shell to an executable that I will
    >create that creates the key values, etc.  THAT's the part I need help with!

    You just need to edit setup1.vbp and re-compile it with your added registry settings.  You can also export the branch from your dev. registry and just include the .reg file in setup.lst (not the recommended approach.)  Of course this will only register specific file extensions.  WinZip and others that affect all extensions are using a special kind of DLL (shell extension.)



Sat, 12 May 2001 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. add explorer file right-click to vb program?

2. add explorer file right-click to vb program?

3. add explorer file right-click to vb program?

4. add explorer file right-click to vb program?

5. add explorer file right-click to vb program?

6. Add a right-Click menu in explorer

7. VB App in Explorer Right-click menu - again...

8. VB IDE Add on - Right-Click

9. Running a VB program from right click menu

10. Right Click in Explorer

11. Right Click in Explorer

12. Right-Click Menus in Explorer

 

 
Powered by phpBB® Forum Software