|
-
Feb 16th, 2003, 02:12 PM
#1
Thread Starter
Hyperactive Member
Contextmenu
VB Code:
Private Sub lblFull_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles lblFull.MouseDown
lblFull.ForeColor = Color.Orange
Me.PopMe.Show(Me, New Point(e.X, e.Y))
End Sub
When i Press lblFull my menu will popup on the top of the form, but i need it to popup on the point i pressed the label...
How can i do that?
There's a certain mystique when I speak, that you notice that it's sorta unique, cause you know it's me
-
Feb 16th, 2003, 05:19 PM
#2
Hyperactive Member
here's one way:
Code:
Dim mnu As New ContextMenu()
mnu = NameOfContextMenu
mnu.Show(Me, lblFull.Location)
this will make it popup at the location of the label.
"The passion lives to keep your faith, though all are different, all are great" ... Michael Hutchence 1960-1997.
Windows & Web Developer
Specialising in Visual Basic .Net & Client Server Programming & Client/Customer Relations Databases
Sutherland Shire, Sydney Australia
www.stingrae.com.au
Developer of Arnold - Gym & Martial Arts Database Management System
www.gymdatabase.com.au
-
Feb 17th, 2003, 03:23 AM
#3
Thread Starter
Hyperactive Member
Thanks Stingrae, exactly what i needed
There's a certain mystique when I speak, that you notice that it's sorta unique, cause you know it's me
-
Feb 20th, 2003, 12:35 AM
#4
I am just learning VB.net (ok so i started about ten minutes ago)
and trying to figure out the popup menu....looked at this thread
one problem...the popup menu does not pupop at the cursor?
but this worked
VB Code:
Private Sub Button1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Button1.MouseDown
Dim mnu As New ContextMenu
mnu = ContextMenu1
mnu.Show(Me, New Point(e.X + Button1.Left, e.Y + Button1.Top))
End Sub
would this be right? or is there a better way?
JPnyc rocks!! (Just ask him!)
If u have your answer please go to the thread tools and click "Mark Thread Resolved"
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
|