Deklarasi
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)
Code yang digunakan
'Code ini akan menampilkan form selalu didepan
rtn = SetWindowPos(OnTop.hwnd, -2, 0, 0, 0, 0, 3)
'Code ini untuk mengembalikan fungsi diatas
rtn = SetWindowPos(OnTop.hwnd, -1, 0, 0, 0, 0, 3)
Cara Menjalankan : Copy code di bawah pada form code)
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)
Private Sub Form_Load()
this code makes the window stay on top
rtn = SetWindowPos(OnTop.hwnd, -2, 0, 0, 0, 0, 3)
End Sub
Tag: Always on top
Baca juga beberapa artikel terkait berikut ini :
0 komentar:
Posting Komentar