473,472 Members | 1,760 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Shell Extension

yxq
Hello
I have some code about shell extension, it works well, but when i choose
more than a txt files and right-click, click open, system popup a dialog
"InvokeCommand", system can not open the txt files, i do not know what
reason.

************************************************** **************************
***************

' Carries out the command associated with
' a context menu item.
'
Private Sub IContextMenu_InvokeCommand(lpici As shlext.CMINVOKECOMMANDINFO)
Dim Idx As Long, Verb As String
On Error Resume Next

' Check if lpVerb is an string pointer
' or the ID

If (lpici.lpVerb \ &H10000) <> 0 Then

' lpVerb is a string so
' copy it from the pointer
Verb = StrFromPtrA(lpici.lpVerb)

' Search the items array for
' the command and convert
' it to the item index
For Idx = 0 To UBound(m_Items)
If m_Items(Idx).Verb = Verb Then
Exit For
End If
Next

Else
Idx = lpici.lpVerb

' Do the action asociated
' with the menu item

Dim fileNames As String

Select Case Idx

Case 0

For Idx = 0 To UBound(m_SelectedFiles)
If fileNames = "" Then
fileNames = m_SelectedFiles(Idx)
Else
fileNames = fileNames & "," & m_SelectedFiles(Idx)
End If
Next

Call Shell(App.Path & "\application1.exe /" & fileNames,
vbNormalFocus)
Case 1

For Idx = 0 To UBound(m_SelectedFiles)
If fileNames = "" Then
fileNames = m_SelectedFiles(Idx)
Else
fileNames = fileNames & "," & m_SelectedFiles(Idx)
End If
Next

Call Shell(App.Path & "\application2.exe /" & fileNames,
vbNormalFocus)
End Select

End If

End Sub
************************************************** **************************
*******

Thanks
Nov 20 '05 #1
0 930

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Tiziano Bettio | last post by:
Hi there I'm looking for a simple solution of a win32 shell extension (virtual drive). It should make available a new drive with letter, which will be read-only. Instead of a network drive or...
2
by: Sin | last post by:
Hello everyone, I'm totally stumped at how little info I can find in MSDN or on the web concerning this. It's almost as if only microsoft personel hold the key to these secrets or something!!! ...
4
by: yxq | last post by:
Hello Can anyone tell me Context Menu shell extension? It is better that provide some samples or links. Thanks
1
by: Luhar | last post by:
Greetings, I'd like to write a shell extension so that a user can right-click on any file, regardless of its extension, and my extension will appear as one of the choices on the context menu...
5
by: gjuro kladaric | last post by:
it was not possible to make a shell extension from within VB2003, I believe has anything changed since then, can I (easily) write a VB code that would function as a shell extension thank you ...
6
by: Pieter | last post by:
Hi, I'm trying to use the Edanmo Shell Extension Library (http://www.mvps.org/emorcillo/en/code/shell/shellextensions.shtml) to make a Context Menu in the Windows Explorer with VB.NET 2005. It...
1
by: James Maeding | last post by:
I was looking for the easiest way to add an item to explorer's right click menus, and I found what looks to be a goldmine. There is a vb.net project available on:...
3
by: Shafiq | last post by:
Hi, I am trying to insert a new toolbar button to the windows explorer menu. I an able to locate the correct ToolbarWindow32, and inserted a button using the code snippet shown below. However...
2
by: Jeff Gaines | last post by:
I am in the process of upgrading to XP 64. VS2008 is running fine but one of my apps, which adds functionality to the Explorer context menu, just won't work under XP 64. Googling resulted in my...
5
by: AGP | last post by:
I have been looking far and wide for an easy to implement shell extension. My needs are basic...for two file extensions .YYY and .ZZZ I would like the context menu in explorer to simply show my app...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.