Imports fix.Org.Mentalis.Utilities Public Class TestApp Function association_file(ByVal extension As String, ByVal contenettype As String, ByVal fullname As String, ByVal propername As String, Optional ByVal iconindex As Short = 0, Optional ByVal iconame As String = "", Optional ByVal cmm As String = "open") Dim FA As New FileAssociation() FA.Extension = extension FA.ContentType = contenettype FA.FullName = fullname FA.ProperName = propername If iconame <> "" Then FA.IconPath = My.Application.Info.DirectoryPath + "\" + iconame + ".ico" FA.IconIndex = 0 End If FA.AddCommand(cmm, Application.ExecutablePath + " %1") FA.Create() ' Dim FA As New FileAssociation() ' FA.Extension = "xyz" ' FA.ContentType = "application/myprogram" ' FA.FullName = "My XYZ Files!" ' FA.ProperName = "XYZ File" ' FA.AddCommand("open", "C:\mydir\myprog.exe %1") ' FA.Create() End Function Function unassociation_file(ByVal extension As String, ByVal contenettype As String, ByVal propername As String) Dim FA As New FileAssociation() FA.Extension = extension FA.ContentType = contenettype FA.ProperName = propername FA.Remove() End Function Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load On Error Resume Next Call association_file("dis", "dis file", "example extension", "dis file") Me.Text = Command() 'Mid(Command(), 2, Len(Command()) - 2) If Me.Text <> "" Then msgbox(Me.text) End If End Sub End Class