Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Open With... API

Posted on 2002-03-08
6
Medium Priority
?
187 Views
Last Modified: 2010-05-02
I'm looking for code (API or OCX) that will enable me to use microsoft's Open With... dialog - the one used to get a user to identify what exe to use when openning a file of and unknown type.
0
Comment
Question by:alaplume
  • 4
6 Comments
 
LVL 16

Accepted Solution

by:
Richie_Simonetti earned 600 total points
ID: 6851186
Open With  
module: SHELL32.DLL  
command: rundll32.exe shell32.dll,OpenAs_RunDLL {drive:\path\filename}
result: displays the application/file "Open With" dialog
result: passing the full file drive, path and name as a parameter will cause the dialog to display the line "Click the program you want to use to open the file '{filename}'".
 

 

0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 6851189
Sorry you could use last code with Shell function or with Shellexecute API.
Hope it helps
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 4

Expert Comment

by:trkcorp
ID: 6851244
Like Richie says; use ShellExecute API.
0
 
LVL 1

Author Comment

by:alaplume
ID: 6866276
It did the job!
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 6867653
Then, why you punished me with "B" grade?
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

782 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question