Solved

Add picture to the menu edit in VB

Posted on 2002-05-24
7
158 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
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
MS Access Search and Replace Using VBA 6 80
vbModal 12 57
Copy a range from 1..n excel sheets to one destination sheet 2 55
adding "ungroup sheets" to existing vbs code 5 26
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 Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

791 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