Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. .NET (Core and Framework)
  4. How to show the windows File Association form?

How to show the windows File Association form?

Scheduled Pinned Locked Moved .NET (Core and Framework)
tutorialquestion
2 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    ninkk
    wrote on last edited by
    #1

    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

    N 1 Reply Last reply
    0
    • N ninkk

      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

      N Offline
      N Offline
      ninkk
      wrote on last edited by
      #2

      Any idea maybe ?

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups