help: always on top 
Author Message
 help: always on top

hey,

there are serveral forms in my project. I want to have one to be a
control form that is always on top. I tried it with the winapi

Declare Function SetWindowPos Lib "user32" (By.....

The result is : the form is loaded but hidden

who can help
Gert Barwinski (gba)



Sun, 27 Aug 2000 03:00:00 GMT  
 help: always on top

Quote:

>hey,

>there are serveral forms in my project. I want to have one to be a
>control form that is always on top. I tried it with the winapi

>Declare Function SetWindowPos Lib "user32" (By.....

>The result is : the form is loaded but hidden

>who can help
>Gert Barwinski (gba)

I initially show the form  -

        SplashForm.Show

And then in the load event of the form, I then make it on top -

        SetWindowPos SplashForm.hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE +
SWP_NOSIZE

The constants if you require -

    Private Const HWND_BOTTOM = 1
    Private Const HWND_NOTOPMOST = -2
    Private Const HWND_TOP = 0
    Private Const HWND_TOPMOST = -1
    Private Const SWP_DRAWFRAME = &H20
    Private Const SWP_HIDEWINDOW = &H80
    Private Const SWP_NOACTIVATE = &H10
    Private Const SWP_NOCOPYBITS = &H100
    Private Const SWP_NOMOVE = &H2
    Private Const SWP_NOREDRAW = &H8
    Private Const SWP_NOREPOSITION = &H200
    Private Const SWP_NOSIZE = &H1
    Private Const SWP_NOZORDER = &H4
    Private Const SWP_SHOWWINDOW = &H40

Seems to work.

Regards

Grant



Thu, 31 Aug 2000 03:00:00 GMT  
 help: always on top


Quote:

>hey,

>there are serveral forms in my project. I want to have one to be a
>control form that is always on top. I tried it with the winapi

Check out http://pi1438.kub.nl:2080/VisualBasicSource/

for the file (example) StayOnTop

gr. walther

http://pi1438.kub.nl:2080/Frankrijk/



Fri, 01 Sep 2000 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Help: Always on top

2. help: always on top

3. Help: Always on top

4. Need Help: always on top

5. Help: Always On Top - setting Z order

6. help, always on top

7. Need Help: Always on Top after Modal form...

8. Need Help: always on top

9. Always on top (ALWAYS)

10. Make a form always on top - always

11. Make a window always on top (of every window..always)

12. Help with Always on Top VB6 please?

 

 
Powered by phpBB® Forum Software