VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Gives the form OnTop status without a timer

by Eric D. Burdo (1 Submission)
Category: Custom Controls/Forms/Menus
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Tue 11th December 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Gives the form OnTop status without a timer

API Declarations


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 Const SWP_NOMOVE = 2
Private Const SWP_NOSIZE = 1
Private Const HWND_TOPMOST = -1
Private Const HWND_NOTOPMOST = -2

Public Sub SetOnTop(ByVal hwnd As Long, ByVal bSetOnTop As Boolean)
Dim lR As Long
If bSetOnTop Then
lR = SetWindowPos(hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE Or
SWP_NOSIZE)
Else
lR = SetWindowPos(hwnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE Or
SWP_NOSIZE)
End If
End Sub



Rate Gives the form OnTop status without a timer



PrivateSubForm_Load()
SetOnTopForm1.Hwnd,True
EndSub

!!EndCod!!

Download this snippet    Add to My Saved Code

Gives the form OnTop status without a timer Comments

No comments have been posted about Gives the form OnTop status without a timer. Why not be the first to post a comment about Gives the form OnTop status without a timer.

Post your comment

Subject:
Message:
0/1000 characters