Manipulasi ShowIn Taskbar pada Form
Source code berikut untuk Memanipulasi ShowIn Taskbar pada Form.
Buat 1 project dengan :
1 Form
1 CheckBox
Copy source code berikut pada Form :
DOWNLOAD Full Source Project
1 Form
1 CheckBox
Copy source code berikut pada Form :
Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long) As Long Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long Private Const GWL_EXSTYLE = (-20) Private Const WS_EX_APPWINDOW = &H40000 Private Function ShowInTheTaskbar(frm As Form, b As Boolean) Dim l As Long frm.Hide l = IIf(b, Not WS_EX_APPWINDOW, WS_EX_APPWINDOW) SetWindowLong frm.hWnd, GWL_EXSTYLE, (GetWindowLong(hWnd, GWL_EXSTYLE) And l) frm.Show End Function Private Sub Check1_Click() ShowInTheTaskbar Me, Check1.Value = 1 End Sub
DOWNLOAD Full Source Project