Hi,
I have added application shortcut to windows context menu in HKEY_CLASSESS_ROOT\*\shell for all files types with this sample value: "C:\myvbapp.exe" "%1"
On myvbapp form load coding (as shown below), I have created a simple alert which shows the directory and the filename whenever user right click on any files in the operating system.
Currently there is no response for all the shortcut files (.lnk) based on the coding above. But for normal file extension, it is able to prompt the directory and filename without any issue.
May I know is it possible to exclude shortcut files (.lnk) in the windows context menu?
Or there is something I can add in the registry or coding to handle the shortcut files (.lnk) as well?
Please advise.
Thanks.
I have added application shortcut to windows context menu in HKEY_CLASSESS_ROOT\*\shell for all files types with this sample value: "C:\myvbapp.exe" "%1"
On myvbapp form load coding (as shown below), I have created a simple alert which shows the directory and the filename whenever user right click on any files in the operating system.
Code:
Dim CommandLineArgs As System.Collections.ObjectModel.ReadOnlyCollection(Of String) = My.Application.CommandLineArgs
For i As Integer = 0 To CommandLineArgs.Count - 1
MessageBox.Show(CommandLineArgs(i))
Next
May I know is it possible to exclude shortcut files (.lnk) in the windows context menu?
Or there is something I can add in the registry or coding to handle the shortcut files (.lnk) as well?
Please advise.
Thanks.