Add your program to the Right-Mouse-Click menu
Let your program be listed in the right-mouse-click for a particular file type. You program can then be run with a simple click
AI
AI Summary: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.
Source Code
Public Sub SetStringValue(Hkey As Long, strPath As String, strValue As String, strdata As String) Dim keyhand As Long Dim i As Long i = RegCreateKey(Hkey, strPath, keyhand) 'Changed the normal keyvalue name to vbNullString to set it as the (Default) value i = RegSetValueEx(keyhand, vbNullString, 0, REG_SZ, ByVal strdata, Len(strdata)) i = RegCloseKey(keyhand) End Sub Private Sub Form_Load() 'Create Reg Key for filetype, (can be found by looking in HKEY_CLASSES_ROOT then the extension, the (Default) value pionts to the file type, located in the HKEY_CLASSES_ROOT folder) 'Replace """C:\Project1.exe"" %1" with your program path & name. "%1" means send the file name you click on as the commandline arguments. SetStringValue HKEY_LOCAL_MACHINE, "SOFTWARE\Classes\Paint.Picture\shell\Text To Display\command", 0, """C:\Project1.exe"" %1" End Sub
Original Comments (3)
Recovered from Wayback Machine