Hi everyone,
I dont know if I found a good method to display a popup (or floating)
listview box control. VB popups a listview ( I'm not sure if it is really a
listview, but at least it looks like) for us to select somethings when we
type Ctrl +J.
Here is what the code to do so:
'-------
You should have a listview control (ListView1) on the form. And have its
View style set to Report and HideColumnHead set to False.
*Set you Form's scalemode to Pixel
'-------Put them in a BAS module
Declare the following APIs:
SetWindowPos
SetParent
GetCursorPos
Declare the following UDT:
POINTAPI
Declare the following constants:
HWND_TOP = 0
SWP_SHOWWINDOW = &H40
'-------Put the following code in a form
private sub Form_Click()
dim pt as POINTAPI
Call SetParent(ListView1.hwnd, 0) 'Desktop's hwnd
Call GetCursorPos(pt) 'get the cursor position
Call SetWindowLong (ListView1.hwnd, _
HWND_TOP, _
pt.X, pt.Y, _
ListView1.width, ListView1.height, _
SWP_SHOWWINDOW)
end sub
'--------end of code-----------
Any ideas??
--
boycheng,
KTMC