|
-
Nov 7th, 2000, 06:34 AM
#1
Thread Starter
Addicted Member
you probably get this all the time but ...
How do you make your own start bar.
Its alway on top, no matter what you load, how do you do it?
Due to the energy crisis, the light at the end of the tunnel has been turned off.
Sorry for any inconvenience this may cause
-
Nov 7th, 2000, 07:13 AM
#2
Member
Use the setwindowpos API call,
Module Code:
Public Declare Function SetWindowPos Lib "user32.dll" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Form Code:
ret = setwindowpos(me.hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE OR SWP_NOSIZE)
Hope this helps
Grant French
-----------------------------------------------
E-Mail: [email protected]
ICQ: 33122184
-
Nov 7th, 2000, 02:32 PM
#3
gfrench, don't forget to include everything. (Constants)
Code:
Private Declare Function SetWindowPos Lib "user32" Alias "SetWindowPos"_
(ByVal hwnd As Long, ByVal hWndInsertAfter As Long, _
ByVal x As Long, ByVal y As Long, ByVal cx As Long, _
ByVal cy As Long, ByVal wFlags As Long) As Long
Const SWP_NOMOVE = 2
Const SWP_NOSIZE = 1
Const FLAGS = SWP_NOMOVE Or SWP_NOSIZE
Const HWND_TOPMOST = -1
Const HWND_NOTOPMOST = -2
Private Sub Form_Load()
SetWindowPos Me.hWnd, HWND_TOPMOST, _
0, 0, 0, 0, FLAGS
End Sub
-
Nov 7th, 2000, 03:22 PM
#4
You don't need constants if they're short enough.
Code:
Private Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Private Sub Form_Load()
SetWindowPos Me.hwnd, -1, 0, 0, 0, 0, 3
End Sub
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
|