Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Add picture to the menu edit in VB

Posted on 2002-05-24
7
Medium Priority
?
169 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 20

Accepted Solution

by:
hes earned 150 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
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 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
 
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: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone 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

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 …
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…
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…
Suggested Courses

604 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