by Vicky Jadhav (Vj) (8 Submissions)
Category: Miscellaneous
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Tue 12th October 2004
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Keep a window on top
' ** Vicky Jadhav **
' ** By Vj Softmode In India **
' ** since From 1999 **
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
Const HWND_TOPMOST = -1
Const SWP_SHOWWINDOW = &H40
Private Sub Form_Load()
Dim retValue As Long
Load Form1
retValue = SetWindowPos(Me.hwnd, HWND_TOPMOST, 100, 200, _
400, 200, SWP_SHOWWINDOW)
End Sub