Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Context Menu

Posted on 2002-04-01
7
Medium Priority
?
368 Views
Last Modified: 2010-05-02
Hi there
I am doing the application in Visual Basic 6.0 and I want to add context menu which can be be seen in
'Windows Explorer' on rigt clicking inside it.
I refered the MSDN Library for the same task but I didn't understand the contents If you know How to make the coding for the same Please let me know the full coding . The proper commentation will help me lot since I am fresher for VB6.0
Thank you.
0
Comment
Question by:amkarambelkar
7 Comments
 
LVL 22

Expert Comment

by:rspahitz
ID: 6910506
I'm assuming you want a "popup" menu.  Try this:

Private Sub SomeControl_MouseDown(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
  If Button = vbRightButton Then
    PopupMenu mnuSomeMenu
  End If
End Sub

"SomeControl" is the name of the control which will receive the context menu.
"mnuSomeMenu" is a predefined menu created using the standard menu editor.  This will also include a set of sub-menu entries which will appear in the popup window.
0
 
LVL 1

Author Comment

by:amkarambelkar
ID: 6910544
I think you are getting confused with my Question
The context menu and Popup menu are two different things
Popup menu runs within application
Context menu is the menu which is appeared when  we right click on any file in  'windows explorer'  like Copy, paste, Delete, create shortcut etc.
0
 
LVL 6

Accepted Solution

by:
MELeBlanc earned 400 total points
ID: 6910571
Take a look at this example:

http://www.planetsourcecode.com/vb/scripts/ShowCode.asp?txtCodeId=12137&lngWId=1

I'm thinking that this is what you are asking for.

-M
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 7

Expert Comment

by:Z_Beeblebrox
ID: 6910584
If I understand you correctly, you want to add your application to the Windows explorer context menu for certain types of files. If this is the case, I don't know how to do it off-hand, but all you need to do is add some entries to the registry, there is no code involved. I am sure someone here knows what entries are required.

Zaphod.
0
 
LVL 1

Author Comment

by:amkarambelkar
ID: 6912407
hi Z_Beeblebrox
You have said rightly but whatyou are suggesting is only valid for Win9x In winNT or win2k we have to creat the Dll
and by registering it and also adding some values in registry we can have the menu in context menu
0
 
LVL 1

Author Comment

by:amkarambelkar
ID: 6913341
Hi MELeBlanc
I have followed your link and got the code file
I am very happy to say that it has worked very good
Thanks a lot.
0
 
LVL 6

Expert Comment

by:MELeBlanc
ID: 6913820
You're most welcome.
Glad I could help.

-M
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

783 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question