HI, I have made a menu with two menu Items
Colors
Size.

Colors will further have the submenu Items-->
FillColor
Exit


FillColor will further have-->Red,Green,Blue

Size --> Small , Large

If i write the foll. code-->
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 2 Then
PopupMenu mnuColors
End If
End Sub

When we right click on the form, it shows PopUpMenu
FillColor
Exit.

But as u right click on The form in the Client Area, Its hows
ViewCode
MenuEditor

But I want a PopUpMenu that shows FillColor & small, Is it possible to combine the menu items from the different menus..

Recommended Answers

All 14 Replies

the menu items that you create for your form can be visible in run mode only. when you right click on your form in the designer you will show vb6's system submenus.

as far as i know combination of menu items is not possible. in order to show the items fillcolor and small you must add them under the same menu. but might be some way using some APIs. try searching in google or into the following site :-
http://msdn.microsoft.com

regards
Shouvik

HI, I have made a menu with two menu Items
Colors
Size.

But as u right click on The form in the Client Area, Its hows
ViewCode
MenuEditor

.

Hi,

I guess, by "Client Area"...? You are talking about Design Time...?

Whatever Menu you have created is shown at Run-Time.. and I think you are checking it in design time. Run the project and Right-Click on the form, your menu (Colors, Size) should pop-up..

Regards
Veena

No No mam, i m checking the menu at runtime only. This is not exactly I want to ask.
i want to ask that Suppose there are two menu items menu1 & menu2.

Menu1 will futher have subitems menu3
& menu4.

Menu2 wil have menu5 & menu6.

when we create POPUP,Either u popup menu3 & menu4, Or Menu5 & menu6.

I want to ask is there is any way by which we can popup menu4 & menu5.Means subitems from the different menus.

did you read my previous reply?

i think you didn't. that's why you are asking the same question again n again...

combining menu items from diff. parent menu cannot be possible. to show these menu4 and menu5 together in runtime you must create them under the same menu head.

hope you will notice now...

regards
Shouvik

I want to ask is there is any way by which we can popup menu4 & menu5.Means subitems from the different menus.

Hi,

Yes, It is possible..
Just Hide Un-Wanted menuItems..
Create Menu Structure Like This :

MainMenu
    Menu1
        Menu3
        Menu4
    Menu2
        Menu5
        Menu6

If you want to show Menu4 and Menu5, use this code:

Menu3.Visible = False
Menu6.Visible=False
Menu1.Visible = True
Menu2.Visible = True
Menu4.Visible = True
Menu5.Visible = True
Me.Popupmenu MainMenu

Regards
Veena

Dear Chodhary,I have read ur previous reply, But queen mam, didn't understand my first ques,dats y i have posted the Ques again to make her understand in a clear way.. raed the Queen mam reply after ur reply. dats y i post the ques again.

Anyway.queen mam has given the soln how to combine diff. menu items.

Queen mam,on form_load i have to write this code...

Hi,

Yes, Write it just before calling the PopupMenu. I saw your first post, you have written to show menu in mouse_down event. Its better to write code in MouseUp event..

Regards
Veena

mam, If i write the foll. code--
mnumenu3.Visible = False
mnumenu6.Visible = False
mnumenu1.Visible = True
mnumenu2.Visible = True
mnumenu4.Visible = True
mnumenu5.Visible = True
Me.PopupMenu MainMenu

what does the above line means??

I do not want to hide the menu Items, without Hiding i want that whether we can made Context menu,dat when clicking right hand mouse on the form at run time, It shows menu3 & menu5.

Cz generally we made the menu Context menu that displays either the menu3,menu4 Or menu5,menu6.

Dats y choudhary told me,we do not made context menu,that displays menu3,menu4..

Hi,Choudhary,can u pls do a favor for me if possible,plz Send me the answer of Connectivity 2000 + VB thread,i have send it, But no-ne replies are there. Its Urgent.

why are you asking like that?

not only me there are so many experts are here. apart from me they can also give you proper suggestions.

ok... check in your other thread.
i have given a sample code there.

regards
Shouvik

Where u have posted the thread. Actually u r online.dats y i told u. If u don't want to reply then its's OK.

why this question is raising?

"If u don't want to reply then its's OK."

i think there must be a misunderstanding. i just said you that not only me others can also give you valuable replies. there is no such problem that i don't want to reply you.
its my pleasure to reply you too...

i told that because due to the language you have used in your reply other members can get hurt from it or there a misunderstanding among the members can arise. personally i don't want that to be happened. so that's why i told you that.. hope you will understand...
so don't think like that any more...

ok..

regards
Shouvik

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.