Solved

Add picture to the menu edit in VB

Posted on 2002-05-24
7
157 Views
Last Modified: 2010-05-02

I want to create my own menu edit (by pressing Ctrl E)
and want to insert a pictures to some sub menues.
For example i want to put diskete picure with "Save" option.
There is a any way to do this ,because i can't find it.

help please.
0
Comment
Question by:Vlad77
7 Comments
 
LVL 20

Accepted Solution

by:
hes earned 50 total points
ID: 7033244
0
 

Author Comment

by:Vlad77
ID: 7033349
Thanks,but this isn't exactly what i want.
I want that this icons can be  pressed or unpressed
It's mean not only a picture but like an object with states :pressed ,unpressed (like in toolbar).

Is this possible?
0
 

Author Comment

by:Vlad77
ID: 7033350
Thanks,but this isn't exactly what i want.
I want that this icons can be  pressed or unpressed
It's mean not only a picture but like an object with states :pressed ,unpressed (like in toolbar).

Is this possible?
0
Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 
LVL 70

Expert Comment

by:Éric Moreau
ID: 7033357
I am not sure that you can acheive this. maybe you will need to provide yourself multiples icons .

anyway, see
http://vbaccelerator.com/codelib/cpopmenu/article.htm
http://www.datadynamics.com/activebar/default.htm
0
 

Expert Comment

by:unni_bcanti
ID: 7033774
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 7128810
Any progress?
0
 

Expert Comment

by:WizOfOz
ID: 7190840
Just a penny...

stock somewhere the state of the menu items

you could then subclass the object containing the menu

catch the creation of the menu with
WM_INITMENU or WM_INITPOPUPMENU (not sure but you can search in the api viewer)

then
SetMenuItemBitmap
to change the bitmap for check in the menu
or
ModifyMenu
to set a bitmap instead of the normal caption
you put the bitmap in the menu

use two different bitmap for pressed or unpressed
if you need only the checkbox different use the first


then
catch the click of the mouse on the menu
(use WM_ACTIVATE)

with the mouse position use
MenuItemFromPoint API
to determine which menu entry contains the specific point
or
WM_MENUSELECT to know the menu item

remember to unsubclass the object at the end of the process or at the exit of the program

Hope this will help
Wiz
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

823 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