How to show the windows File Association form?
-
Hi, i want to show the windows File Association form when user presses a button. I use the following code: Imports System.Runtime.InteropServices Public Declare Auto Function OpenWithDialog Lib "shell32.dll" Alias "OpenAs_RunDLL" (ByVal hwnd As IntPtr, ByVal hinst As IntPtr, ByVal lpFile As String, ByVal nShowCmd As Int32) As Int32 Private Sub button_ItemClick(...) OpenWithDialog(Me.Handle, Marshal.GetHINSTANCE(Me.GetType().Module), "", CInt(AppWinStyle.NormalFocus)) End Sub Well, it opens a similar form, the "Open With..." form, but i am not looking for the Open With... form. I imagine that i have to make 1-2 changes and after that then it will really open the File Association form(Set Association - Associate a file type or protocol with a specific program). Any idea what i need to change on this so it work? Thanks in advance
-
Hi, i want to show the windows File Association form when user presses a button. I use the following code: Imports System.Runtime.InteropServices Public Declare Auto Function OpenWithDialog Lib "shell32.dll" Alias "OpenAs_RunDLL" (ByVal hwnd As IntPtr, ByVal hinst As IntPtr, ByVal lpFile As String, ByVal nShowCmd As Int32) As Int32 Private Sub button_ItemClick(...) OpenWithDialog(Me.Handle, Marshal.GetHINSTANCE(Me.GetType().Module), "", CInt(AppWinStyle.NormalFocus)) End Sub Well, it opens a similar form, the "Open With..." form, but i am not looking for the Open With... form. I imagine that i have to make 1-2 changes and after that then it will really open the File Association form(Set Association - Associate a file type or protocol with a specific program). Any idea what i need to change on this so it work? Thanks in advance