åbne filer i default prg i Win. Forms "Webbrowser"..i en fildialo
Hej gutterHvordan laver jeg det i Explorer¨(Win Form) så når jeg under det første pkt"Proces" (hedder det i min! ellers hedder det vist nok Filer) klikker ned på "Open" og danser ud på (Menustrip) og finder det prg/fil som jeg gerne vil åbne - SÅ OSSE får maskinen til at åbne for exe fil uden fejlmelding (vedhæftet)
på forhånd tuusind tag
mvh Krede
'code:
Private Sub TreeView_AfterSelect(ByVal sender As Object, ByVal e As System.Windows.Forms.TreeViewEventArgs) Handles TreeView.AfterSelect
' TODO: Add code to change the listview contents based on the currently-selected node of the treeview
LoadListView()
End Sub
Public 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 AgroQToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AgroQToolStripMenuItem.Click
ShellExecute(0, "open", "C:\test.txt", vbNullString, "C:\", 1)
End Sub
FEJLmelding;
PInvokeStackImbalance was detected
Message: A call to PInvoke function 'Agro_Q_Manager1!Agro_Q_Manager1.Explorer1::ShellExecute' has unbalanced the stack. This is likely because the managed PInvoke signature does not match the unmanaged target signature. Check that the calling convention and parameters of the PInvoke signature match the target unmanaged signature.