VB-Homepage Tipp 004

Programm soll immer im Vordergrund liegen

General / Declaration
#16Bit
Declare Function SetWindowPos Lib "User" (ByVal h%, ByVal hb%, ByVal X%, ByVal Y%, ByVal cx%, ByVal cy%, _
ByVal f%) As Integer
#32Bit
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
#16 & 32Bit
Const FLAGS = 1
Const HWND_TOPMOST = -1

Form1/Load
Dim Success As Integer
Success% = SetWindowPos(Form1.hWnd, HWND_TOPMOST, 0, 0, 0, 0, FLAGS)
.....


Tipp-Download

Quelle :

Zurück zur Übersichtsseite