|
-
Mar 9th, 2007, 01:39 PM
#1
Thread Starter
Lively Member
how to add a small picture in form menu.
i want add a small picture in form menu.when click the picture,the menu list like "maximize,minimize,close.."will pop up. How to write the code?
-
Mar 9th, 2007, 01:55 PM
#2
Hyperactive Member
Re: how to add a small picture in form menu.
well, if you are referring to something similar to the Control icon that is at the top-left corner of most forms that allows you to Minimize, Maximize, close etc..
That is built-in and shows up by default.
If you are just wanting to make your own for anywhere on the form, you can put an image on the form (we'll call it image1)
Then use the VB Menu Editor to create a menu structure that has the items you want to include. Set the first item in the menu to false so it doesn't show up at the menu bar at the top.
Then you can do something like this:
vb Code:
Private Sub image1_Click()
Me.PopUpMenu mnuYourMenuName
End Sub
This will cause the menu to popup when you click the image.
If this is not what you are looking for, then I apologize for leading you in the wrong direction
-
Mar 9th, 2007, 02:00 PM
#3
Re: how to add a small picture in form menu.
Are you asking how to add icons to a standard VB drop down menu?
-
Mar 9th, 2007, 02:04 PM
#4
Thread Starter
Lively Member
Re: how to add a small picture in form menu.
 Originally Posted by Capp
well, if you are referring to something similar to the Control icon that is at the top-left corner of most forms that allows you to Minimize, Maximize, close etc..
That is built-in and shows up by default.
what i want is similar to control icon.
-
Mar 9th, 2007, 02:06 PM
#5
Re: how to add a small picture in form menu.
You can set the icon from Form's Icon property. Is it what you want ?
If not, could you please describe a little more ? Perhaps with a picture ?
-
Mar 9th, 2007, 06:12 PM
#6
Re: how to add a small picture in form menu.
I think he wants to add another control box to the form. You can't do it in VB without subclassing the form and drawing it yourself.
The most difficult part of developing a program is understanding the problem.
The second most difficult part is deciding how you're going to solve the problem.
Actually writing the program (translating your solution into some computer language) is the easiest part.
Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.
Please Help Us To Save Ana
-
Mar 9th, 2007, 10:31 PM
#7
Thread Starter
Lively Member
Re: how to add a small picture in form menu.
 Originally Posted by Hack
Are you asking how to add icons to a standard VB drop down menu?
can somebody provide more in add icons to a standard VB drop down menu?
-
Mar 9th, 2007, 11:46 PM
#8
Re: how to add a small picture in form menu.
You'll need SetMenuItemBitmaps API for this. See this pages:
http://support.microsoft.com/kb/71281
http://allapi.mentalis.org/apilist/S...mBitmaps.shtml (example at bottom of the page)
also search the forum for "SetMenuItemBitmaps".
hope it helps.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|