|
-
Dec 26th, 2002, 12:59 AM
#1
Thread Starter
Hyperactive Member
setting location of an object.
how do you set the old .left and .top properties so that the control moves to where you tell it?
i've tried the following two methods and neither work. all i want is for the combo box to appear where the mouse is.
Code:
Dim p As Point
p.X = Cursor.Position.X
p.Y = Cursor.Position.Y
ComboBox.PointToScreen(p)
Code:
ComboBox.Left = Cursor.Position.X
ComboBox.Top = Cursor.Position.Y
"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
-
Dec 26th, 2002, 01:23 AM
#2
ComboBox.Location = Cursor.Position
-
Dec 26th, 2002, 01:39 AM
#3
Thread Starter
Hyperactive Member
that just made it dissappear!
do you have to set to form to be in pixels/twips or something?
"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
-
Dec 26th, 2002, 01:45 AM
#4
Thread Starter
Hyperactive Member
d'oh, it helps if i take into account the location of the form!
"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
-
Dec 26th, 2002, 02:33 AM
#5
Fanatic Member
.NET uses pixels for locations and sizes.
Using VB.NET 2003/.NET 1.1/C# 2.0
http://del.icio.us/rajoo
Blow your mind, smoke gunpowder
Ashes to ashes, dust to dust
If God won't have you, the devil will. - Author unknown
Don't follow me, I'm lost too ...
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
|