Tutor :
1. Buka Visual Basic > Standard Exe
2. Buatlah Module
3. Masukkan Kode Berikut Ini Kedalam Module
Public Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, y, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Public Const HWND_TOPMOST = -1
Public Const HWND_NOTOPMOST = -2
Public Const SWP_NOMOVE = &H2
Public Const SWP_NOSIZE = &H1
Public Const SWP_NOACTIVATE = &H10
Public Const SWP_SHOWWINDOW = &H40
Public Const TOPMOST_FLAGS = SWP_NOMOVE Or SWP_NOSIZE
Public Sub MakeNormal(lngHwnd As Long)
SetWindowPos lngHwnd, HWND_NOTOPMOST, 0, 0, 0, 0, TOPMOST_FLAGS
End Sub
Public Sub MakeTopMost(lngHwnd As Long)
SetWindowPos lngHwnd, HWND_TOPMOST, 0, 0, 0, 0, TOPMOST_FLAGS
End Sub
5. Tambah kan lah CheckBox ke dalam Form dengan nama Check1 dan berilah kodenya
Private Sub Check1_Click()
If Check1.Value = vbChecked Then
MakeTopMost hwnd
Else
MakeNormal hwnd
End If
End Sub
6. Buat exe-nya dan cobalah .. Program selalu didepan
Bingung ? PM Facebook Ridho
Judul: [Visual Basic 6.0] Agar Program Selalu Didepan
Rating: 100% based on 99998 ratings. 99 user reviews.
Ditulis Oleh 4:03 PM
Rating: 100% based on 99998 ratings. 99 user reviews.
Ditulis Oleh 4:03 PM
ilmu visual basic ane masih cetek gan :D
BalasHapusyang penting kemauan aja mau belajar :D
Hapussebelumnya makasih
Wah ane VB'nya masih dasar gan.....hehe
BalasHapusngertinya cm buat program kalkulator xixixixi
ohh , hehehe
Hapusmakasih udah berkunjung
wesh ,. ini yang saya cari thnks gan
BalasHapushehehe
Hapusudah jelas kan tutornya ? :D
wahh ternyata ada caranya ya..
BalasHapusjelas dong :)
Hapus