Visual Basic Free

Visual Basic Free

Share

Gratis Belajar Visual Basic dari Agus Saputra Sijabat

28/06/2012

Cara menghilangkan taskbar windows .

Okelah kalau begitu saya akan
lanjutkan tentang coding nya
bagi yang tertarik silakan
ikuti langkah - langkah
berikut ... Tambahkan tiga buah
CommandButton diproject,
masing-masing dengan nama :
cmdTaskbar, cmdStartButton
dan cmdSystemClock Tambahkan satu buah Module ' Tempatkan Coding dibawah
ini pada Module Public Declare Function
ShowWindow Lib
"user32" (ByVal hwnd As
Long, ByVal nCmdShow As
Long) As Long
Public Declare Function FindWindow Lib "user32"
Alias "FindWindowA" (ByVal
lpClassName As String, ByVal
lpWindowName As String) As
Long
Public Declare Function GetDlgItem Lib
"user32" (ByVal hDlg As Long,
ByVal nIDDlgItem As Long)
As Long
Public TaskBarStyle As
Boolean, StartButtonStyle As Boolean, SystemClockStyle As
Boolean
Public Const StartButtonID =
&H130
Public Const SystemClockID =
&H12F Public Const SW_HIDE = 0
Public Const SW_SHOW = 5 Public Sub HideTaskBar()
Dim wClassName As String
Dim hwndTaskbar As Long
wClassName = "Shell_
TrayWnd"
hwndTaskbar = FindWindow (wClassName, vbNullString)
If TaskBarStyle = False Then
Form1.cmdTaskbar.Caption =
"Show Taskbar"
ShowWindow hwndTaskbar,
SW_HIDE TaskBarStyle = True
Else
Form1.cmdTaskbar.Caption =
"Hide Taskbar"
ShowWindow hwndTaskbar,
SW_SHOW TaskBarStyle = False
End If
End Sub Public Sub HideStartButton()
Dim wClassName As String
Dim hwndTaskbar As Long,
hwndStartbutton As Long
wClassName = "Shell_
TrayWnd" hwndTaskbar = FindWindow
(wClassName, vbNullString)
hwndStartbutton =
GetDlgItem(hwndTaskbar,
StartButtonID)
If StartButtonStyle = False Then
Form1.cmdStartButton.Caption
= "Show Start Button"
ShowWindow
hwndStartbutton, SW_HIDE
StartButtonStyle = True Else
Form1.cmdStartButton.Caption
= "Hide Start Button"
ShowWindow
hwndStartbutton, SW_SHOW
StartButtonStyle = False End If
End Sub Public Sub HideSystemClock()
Dim wClassName As String
Dim hwndTaskbar As Long,
hwndSystemClock As Long
wClassName = "Shell_
TrayWnd" hwndTaskbar = FindWindow
(wClassName, vbNullString)
hwndSystemClock =
GetDlgItem(GetDlgItem
(hwndTaskbar,
SystemClockID), SystemClockID)
If SystemClockStyle = False
Then
Form1.cmdSystemClock.Caption
= "Show System Colock"
ShowWindow hwndSystemClock, SW_HIDE
SystemClockStyle = True
Else
Form1.cmdSystemClock.Caption
= "Hide System Clock"
ShowWindow hwndSystemClock, 5
SystemClockStyle = False
End If
End Sub Public Sub SetToDefault()
TaskBarStyle = True
StartButtonStyle = True
SystemClockStyle = True
HideTaskBar
HideStartButton HideSystemClock
End Sub ' Tempatkan Coding dibawah
ini pada Form Project Private Sub cmdStartButton_
Click()
HideStartButton
End Sub Private Sub cmdSystemClock_
Click()
HideSystemClock
End Sub Private Sub cmdTaskbar_Click
()
HideTaskBar
End Sub Private Sub Form_Load()
cmdTaskbar.Caption = "Hide
TaskBar"
cmdStartButton.Caption =
"Hide Start Button"
cmdSystemClock.Caption = "Hide System Clock"
End Sub Private Sub Form_Unload
(Cancel As Integer)
SetToDefault
End Sub Mudah - mudahan Tips ini ada
mamfaat nya bagi kita semua
dan VB Developer khususnya,
semoga tidak digunakan
untuk menjahili teman atau
orang lain. Kalau ada kesempatan dan waktu kita
akan ketemu dengan Tips -
Trik berikutnya .. terima
kasih.

Want your school to be the top-listed School/college in Pekanbaru?
Click here to claim your Sponsored Listing.

Category

Telephone

Address


Pekanbaru
28284