Home > Software engineering >  How to use dialog opens special files
How to use dialog opens special files

Time:09-28

I have a eprj file, is to use PG4UW application to open, how CommonDialog1 through dialog to open, is to use shellexecute, can you teach the
Such as PG4UW application path to D: \ PG4UW exe
Need to open the eprj file path: E: 1. Eprj

The shellexecute how to write, thank you, has opened the way to the eprj file associated with PGUW

CodePudding user response:

If the program supports command line parameters, using VB6 Shell, don't have to use the API.
If it does not support, you use ShellExecute doesn't work, I am afraid, ()

Try to use the:
The Shell "D: \ pg4uw. Exe e: \ 1. Eprj", vbnormalocus

CodePudding user response:

The last parameter is missing a letter,
Vbnormalfocus
May didn't lose the right of it, you're losing in the IDE code, it has a parameter list, you look for "the most like" the argument went,

CodePudding user response:

[code=vb 'press CTRL + t when the design, check the Microsoft Common Dialog control (sp6) determine, to form add
'a commondialong control
Private Declare Function ShellExecute Lib "shell32. DLL" Alias "ShellExecuteA" (ByVal HWND As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

Private Sub Form_Load ()
CommonDialog1. ShowOpen
ShellExecute 0, "open", CommonDialog1. The FileName, ""," ", 5
End Sub] [/code]

CodePudding user response:

 
'when the design press CTRL + t, check the Microsoft Common Dialog control (sp6) determine, to form add
'a commondialong control
Private Declare Function ShellExecute Lib "shell32. DLL" Alias "ShellExecuteA" (ByVal HWND As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

Private Sub Form_Load ()
CommonDialog1. ShowOpen
ShellExecute 0, "open", CommonDialog1. The FileName, ""," ", 5
End Sub
  • Related