VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Add your program to the Right-Mouse-Click menu

Jamin  (2 Submissions)   Windows System Services   Visual Basic 5.0   Beginner   Wed 3rd February 2021

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

Inputs
The filetype you want to add to. Your program's path & filename.

Assumes
This program only adds the regisrty key. It can be removed by running regedit then manually deleting the key. The location can be seen in the code.

Returns
Adds a registry key

Side Effects
Playing with the registry can be dangerous. I have run this on my computer and it works fine. I take no responsibility for any mishaps that occur.

API Declarations
Const REG_SZ = 1
Const HKEY_LOCAL_MACHINE = &H80000002
Private Declare Function RegCloseKey Lib "advapi32.dll" (ByVal Hkey As Long) As Long
Private Declare Function RegCreateKey Lib "advapi32.dll" Alias "RegCreateKeyA" (ByVal Hkey As Long, ByVal lpSubKey As String, phkResult As Long) As Long
Private Declare Function RegSetValueEx Lib "advapi32.dll" Alias "RegSetValueExA" (ByVal Hkey As Long, ByVal lpValueName As String, ByVal Reserved As Long, ByVal dwType As Long, lpData As Any, ByVal cbData As Long) As Long

Rate Add your program to the Right-Mouse-Click menu (4(4 Vote))
Add your program to the Right-Mouse-Click menu.bas

Add your program to the Right-Mouse-Click menu Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters