Floating Listview 
Author Message
 Floating Listview

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



Mon, 21 Jan 2002 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. FLOATING HELP - FLOATING HELP - FLOATING HELP - SOS - SOS - SOS

2. FLOATING HELP - FLOATING HELP - FLOATING HELP - SOS - SOS - SOS

3. FLOATING HELP - FLOATING HELP - FLOATING HELP - SOS - SOS - SOS

4. FLOATING HELP - FLOATING HELP - FLOATING HELP - SOS - SOS - SOS

5. FLOATING HELP - FLOATING HELP - FLOATING HELP - SOS - SOS - SOS

6. floating toolbars and images in listviews

7. Converting floating point number to IEEE 32-bit precision floating point format

8. Converting floating number to the IEEE 32/40-bit precision floating point format

9. Drag an item of Listview to another position of the same ListView

10. Ownerdraw works with ListView 5.0 but not with ListView 6.0

11. Dragging from ListView to ListView or TreeView

12. Listview vs. Extended Listview

 

 
Powered by phpBB® Forum Software