First: Make a button on menustrip or where ever you want it. Then name it set as default editor
Second: View the code of the form and at the very top put
Code: Select all
Imports Microsoft.Win32
Code: Select all
If MsgBox("Are you sure you want to set 'name of project here' as the default map editor?", MsgBoxStyle.YesNo, "Set As Default Map Editor?") = MsgBoxResult.Yes Then
Dim regKey As RegistryKey
regKey = Registry.ClassesRoot.CreateSubKey("'name of project here'\")
regKey.SetValue("", "Halo 2 Map File")
regKey = Registry.ClassesRoot.CreateSubKey("'name of project here'\shell\open\command")
regKey.SetValue("", Application.ExecutablePath & " %1")
regKey = Registry.ClassesRoot.CreateSubKey("'name of project here'\DefaultIcon")
regKey.SetValue("", Application.ExecutablePath & ",0")
regKey = Registry.ClassesRoot.CreateSubKey(".map")
regKey.SetValue("", "'name of project here'")
regKey.Close()
MsgBox("Done.", MsgBoxStyle.Information, "Registry Information:")
End If
Now the halo 2 map icons will be the icon of your app, and when you double click the maps it should open up your app
here are what my map files look like, it has the icon of my project
Hope this helps someone.
EDIT: this is in vb 2005 EE