Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do you use the "Open With" drop down list in VB6 1

Status
Not open for further replies.

BruceBussell

Programmer
Jul 14, 2003
49
US
How do you use the Windows "Open With" drop down list in VB6 when no File Association exists so you can't use ShellExecute as noted below

r = ShellExecute(plngHandle, "open", OpenFile1Path$, 0, 0, SW_SHOWNORMAL)

This code will give me an error that I can process if a File is not found, but I don't know how to then call the "Open With" drop down list where a user can select a program to open the chosen file with if there is no existing File Association.
 
Code:
Public Sub DisplayOpenWith(strFile As String)
    On Error Resume Next
    Shell "rundll32.exe shell32.dll, OpenAs_RunDLL " & strFile
End Sub

Credit to Freevbcode

Take Care

Matt
If at first you don't succeed, skydiving is not for you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top