Sabtu, 13 Oktober 2012

VB 6: Menyembunyikan Taskbar Windows


Artikel yang sebelumnya membahas tentang menonaktifkan menu start. Dan sekarang saya akan menulis tentang menyembunyikan taskbar.
Langsung ada nih ya..

Lihat gambar di bawah ini:

Copas aja coding di bawah ini...

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
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" _
(ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Const SWP_HIDEWINDOW = &H80
Const SWP_SHOWWINDOW = &H40

Private Sub Command1_Click()
hwnd1 = FindWindow("Shell_traywnd", "")
Call SetWindowPos(hwnd1, 0, 0, 0, 0, 0, SWP_HIDEWINDOW)
End Sub

Private Sub Command2_Click()
hwnd1 = FindWindow("Shell_traywnd", "")
Call SetWindowPos(hwnd1, 0, 0, 0, 0, 0, SWP_SHOWWINDOW)
End Sub

Salam seneng nih yea, selamat mencoba dan semoga bermanfaat
Jangan lupa komennya makasih.

Tidak ada komentar:

Posting Komentar

AHA..