Menyembunyikan TaskBar dan Desktop Icon
Berikut ini adalah contoh kode yang digunakan untuk menyembunyikan TaskBar dan Desktop Icon. Buat Project baru dengan sebuah Form didalamnya.
[ VB 6.0 ]
Di bagian '(Declarations)' dari Form ketikkan :
Private Declare Function FindWindow Lib "user32.dll" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function ShowWindow Lib "user32.dll" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Dan di bagian Form_Load ketikkan :Private Declare Function ShowWindow Lib "user32.dll" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
ShowWindow FindWindow("Shell_TrayWnd", vbNullString), 0 'taskbar
ShowWindow FindWindow("Progman", vbNullString), 0 'desktop icon
ShowWindow FindWindow("Progman", vbNullString), 0 'desktop icon
[ VB .NET ]
Di bagian '(Declarations)' dari Form ketikkan :
Private Declare Function FindWindow Lib "user32.dll" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Integer
Private Declare Function ShowWindow Lib "user32.dll" (ByVal hwnd As Integer, ByVal nCmdShow As Integer) As Integer
Dan di bagian Form1_Load ketikkan :Private Declare Function ShowWindow Lib "user32.dll" (ByVal hwnd As Integer, ByVal nCmdShow As Integer) As Integer
ShowWindow(FindWindow("Shell_TrayWnd", vbNullString), 0) 'taskbar
ShowWindow(FindWindow("Progman", vbNullString), 0) 'desktop icon
ShowWindow(FindWindow("Progman", vbNullString), 0) 'desktop icon
CATATAN : Jika Anda ingin mengembalikannya seperti semula, gantikan nilai 0 yang berwarna merah, menjadi nilai 1.
0 Komentar:
Posting Komentar
Pengunjung yang baik selalu meninggalkan jejak berupa komentar. :)
Berlangganan Posting Komentar [Atom]
<< Beranda