|
-
November 30th, 2009, 09:37 PM
#1
VB.net popup menu...
Hello,
Is there a way of creating a popup menu in vb.net?
I want to be able to click a button and it pop up the menu next to the button.
But, I want the size of the text in the menu a bit bigger.
anyone know how to do it?
(I have been trying for a while now and can't work it out)
Thanks.
-
December 1st, 2009, 09:53 PM
#2
Re: VB.net popup menu...
You can create a form, any size you want. You can move it, resize it, and then show it.
-
December 2nd, 2009, 07:42 PM
#3
Re: VB.net popup menu...
Hello,
That is for a form.. I am talking about a menu.
I want to be able to click on a button and display the menu where the button is.
I don't want to resize a form or move a form.
-
December 4th, 2009, 04:31 AM
#4
Re: VB.net popup menu...
Why not just use the ContextMenu object, on the button's Left Click - instead of Right Click ¿
-
December 4th, 2009, 11:26 AM
#5
Re: VB.net popup menu...
Yup, ContextMenuStrip is probably the most straight forward.
Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim nf As New Font(Drawing.FontFamily.GenericSansSerif, 10, FontStyle.Regular)
ContextMenuStrip1.Font = nf
ContextMenuStrip1.Show(Button1, 5, 5)
End Sub
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
|