Marco,
An OK and a cancel. Have an excellent holiday, everyone; I'm off to
Yorkshire to see my folks. Later,
Mark
-----Original Message-----
From: Marco Straforini [mailto:marco.straforini@c...]
Sent: 21 December 2001 21:35
To: professional vb
Subject: [pro_vb] RE: Getting the screen coordinates of controls
sounds like a good plan.
Let me know how it goes.
Just one question: how does the user dismiss the listView after finished
selecting items?
Are you providing a OK button or what?
Happy holiday,
m.
-----Original Message-----
From: Mark Roworth [mailto:markro@p...]
Sent: Friday, December 21, 2001 12:23 AM
To: professional vb
Subject: [pro_vb] RE: Getting the screen coordinates of controls
I want the user to be able to check and uncheck a number of items from the
list before the listview/menu disappears. A menu will disappear when you
click on the item (I think?) However, If I use your function below, and I
know the position of the pointer relative to the thing it has clicked on, I
can work out the screen position to show the form in. However, the .Extender
sounds like the ticket to me and a more pureist solution.
Mark
-----Original Message-----
From: Marco Straforini [mailto:marco.straforini@c...]
Sent: 20 December 2001 18:02
To: professional vb
Subject: [pro_vb] RE: Getting the screen coordinates of controls
You are very welcome.
If the parent object is another usercontrol, you have to use the
Extender object to get the standard control properties like Left
and Right.
Anyhow, this is how you get the screen coordinates of the cursor:
Private Type POINTAPI
x As Long
y As Long
End Type
Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As
Long
If I understand correctly, you want to put a listView in a bordless form
and display that form modal. Am I .extender.right? :) Why don't you use
a popup menu (menu items can be checked) ?
m.
-----Original Message-----
From: Mark Roworth [mailto:markro@p...]
Sent: Saturday, December 01, 2001 12:31 AM
To: professional vb
Subject: [pro_vb] RE: Getting the screen coordinates of controls
I've tried this. VB obviously late-binds Object to the Parent object, but
refuses to recognise that it has .left and .top properties, which is odd.
I would use one in the usercontrol, except that I am effectively building up
a combobox, with a dropdown with checkboxes (and hence am using a textbox,
command button and listview to facilitate this). The usercontrol clips the
display of controls within it to it's extent, so that the listview won't
show (it lies outside the visual extent of the usercontrol). How do I go
about getting the global mouse coordinates? I could globally work out where
the top left of the textbox is then.
Many thanks,
Mark