yeketaz
کاربر با تجربه
ارسالها: 744
موضوعها: 123
تاریخ عضویت: اسفند ۱۳۸۶
تشکرها : 520
( 1050 تشکر در 294 ارسال )
|
RE: بهترين سورسهاي ويژوال بيسيك 6
برای کدهای زیر روی هر فرم دو دکمه اصافه کنید
مخفی و ظاهر کردن تسک بار
کد: Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Private Const SW_HIDE = 0
Private Const SW_NORMAL = 1
Private Sub HideTaskBar()
Dim h As Long
h = FindWindow("Shell_TrayWnd", vbNullString)
ShowWindow h, SW_HIDE
End Sub
Private Sub ShowTaskBar()
Dim h As Long
h = FindWindow("Shell_TrayWnd", vbNullString)
ShowWindow h, SW_NORMAL
End Sub
Private Sub Command1_Click()
Call HideTaskBar
End Sub
Private Sub Command2_Click()
Call ShowTaskBar
End Sub
مخفی و ظاهر کردن Start
کد: Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Private Const SW_HIDE = 0
Private Const SW_NORMAL = 1
Private Sub HideStart()
Dim h As Long
h = FindWindow("Shell_TrayWnd", vbNullString)
h = FindWindowEx(h, 0, "Button", vbNullString)
ShowWindow h, SW_HIDE
End Sub
Private Sub ShowStart()
Dim h As Long
h = FindWindow("Shell_TrayWnd", vbNullString)
h = FindWindowEx(h, 0, "Button", vbNullString)
ShowWindow h, SW_NORMAL
End Sub
Private Sub Command1_Click()
Call HideStart
End Sub
Private Sub Command2_Click()
Call ShowStart
End Sub
مخفی و ظاهر کردن قسمت بین Start و Tray Notify
کد: Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Private Const SW_HIDE = 0
Private Const SW_NORMAL = 1
Private Sub HideReBar()
Dim h As Long
h = FindWindow("Shell_TrayWnd", vbNullString)
h = FindWindowEx(h, 0, "ReBarWindow32", vbNullString)
ShowWindow h, SW_HIDE
End Sub
Private Sub ShowReBar()
Dim h As Long
h = FindWindow("Shell_TrayWnd", vbNullString)
h = FindWindowEx(h, 0, "ReBarWindow32", vbNullString)
ShowWindow h, SW_NORMAL
End Sub
Private Sub Command1_Click()
Call HideReBar
End Sub
Private Sub Command2_Click()
Call ShowReBar
End Sub
مخفی کردن قسمت TrayNotify
کد: Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Private Const SW_HIDE = 0
Private Const SW_NORMAL = 1
Private Sub HideTrayNotify()
Dim h As Long
h = FindWindow("Shell_TrayWnd", vbNullString)
h = FindWindowEx(h, 0, "TrayNotifyWnd", vbNullString)
ShowWindow h, SW_HIDE
End Sub
Private Sub ShowTrayNotify()
Dim h As Long
h = FindWindow("Shell_TrayWnd", vbNullString)
h = FindWindowEx(h, 0, "TrayNotifyWnd", vbNullString)
ShowWindow h, SW_NORMAL
End Sub
Private Sub Command1_Click()
Call HideTrayNotify
End Sub
Private Sub Command2_Click()
Call ShowTrayNotify
End Sub
مخفی و ظاهر کردن قسمت QuickLunch
کد: Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Private Const SW_HIDE = 0
Private Const SW_NORMAL = 1
Private Sub HideQL()
Dim h As Long
h = FindWindow("Shell_TrayWnd", vbNullString)
h = FindWindowEx(h, 0, "ReBarWindow32", vbNullString)
h = FindWindowEx(h, 0, "ToolbarWindow32", vbNullString)
ShowWindow h, SW_HIDE
End Sub
Private Sub ShowQL()
Dim h As Long
h = FindWindow("Shell_TrayWnd", vbNullString)
h = FindWindowEx(h, 0, "ReBarWindow32", vbNullString)
h = FindWindowEx(h, 0, "ToolbarWindow32", vbNullString)
ShowWindow h, SW_NORMAL
End Sub
Private Sub Command1_Click()
Call HideQL
End Sub
Private Sub Command2_Click()
Call ShowQL
End Sub
مخفی و ظاهر کردن قسمت نمایش برنامه های باز
کد: Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Private Const SW_HIDE = 0
Private Const SW_NORMAL = 1
Private Sub HidePrograms()
Dim h As Long
h = FindWindow("Shell_TrayWnd", vbNullString)
h = FindWindowEx(h, 0, "ReBarWindow32", vbNullString)
h = FindWindowEx(h, 0, "MSTaskSwWClass", vbNullString)
h = FindWindowEx(h, 0, "ToolbarWindow32", vbNullString)
ShowWindow h, SW_HIDE
End Sub
Private Sub ShowPrograms()
Dim h As Long
h = FindWindow("Shell_TrayWnd", vbNullString)
h = FindWindowEx(h, 0, "ReBarWindow32", vbNullString)
h = FindWindowEx(h, 0, "MSTaskSwWClass", vbNullString)
h = FindWindowEx(h, 0, "ToolbarWindow32", vbNullString)
ShowWindow h, SW_NORMAL
End Sub
Private Sub Command1_Click()
Call HidePrograms
End Sub
Private Sub Command2_Click()
Call ShowPrograms
End Sub
مخفی و ظاهر کردن قسمت زبان نوشتار
کد: Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Private Const SW_HIDE = 0
Private Const SW_NORMAL = 1
Private Sub HideLan()
Dim h As Long
h = FindWindow("Shell_TrayWnd", vbNullString)
h = FindWindowEx(h, 0, "ReBarWindow32", vbNullString)
h = FindWindowEx(h, 0, "CiceroUIWndFrame", vbNullString)
ShowWindow h, SW_HIDE
End Sub
Private Sub ShowLan()
Dim h As Long
h = FindWindow("Shell_TrayWnd", vbNullString)
h = FindWindowEx(h, 0, "ReBarWindow32", vbNullString)
h = FindWindowEx(h, 0, "CiceroUIWndFrame", vbNullString)
ShowWindow h, SW_NORMAL
End Sub
Private Sub Command1_Click()
Call HideLan
End Sub
Private Sub Command2_Click()
Call ShowLan
End Sub
مخفی و ظاهر کردن دکمه قسمت Notification Area
کد: Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Private Const SW_HIDE = 0
Private Const SW_NORMAL = 1
Private Sub HideNAButton()
Dim h As Long
h = FindWindow("Shell_TrayWnd", vbNullString)
h = FindWindowEx(h, 0, "TrayNotifyWnd", vbNullString)
h = FindWindowEx(h, 0, "Button", vbNullString)
ShowWindow h, SW_HIDE
End Sub
Private Sub ShowNAButton()
Dim h As Long
h = FindWindow("Shell_TrayWnd", vbNullString)
h = FindWindowEx(h, 0, "TrayNotifyWnd", vbNullString)
h = FindWindowEx(h, 0, "Button", vbNullString)
ShowWindow h, SW_NORMAL
End Sub
Private Sub Command1_Click()
Call HideNAButton
End Sub
Private Sub Command2_Click()
Call ShowNAButton
End Sub
مخفی و ظاهر کردن ساعت و تاریخ
کد: Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Private Const SW_HIDE = 0
Private Const SW_NORMAL = 1
Private Sub HideClock()
Dim h As Long
h = FindWindow("Shell_TrayWnd", vbNullString)
h = FindWindowEx(h, 0, "TrayNotifyWnd", vbNullString)
h = FindWindowEx(h, 0, "TrayClockWClass", vbNullString)
ShowWindow h, SW_HIDE
End Sub
Private Sub ShowClock()
Dim h As Long
h = FindWindow("Shell_TrayWnd", vbNullString)
h = FindWindowEx(h, 0, "TrayNotifyWnd", vbNullString)
h = FindWindowEx(h, 0, "TrayClockWClass", vbNullString)
ShowWindow h, SW_NORMAL
End Sub
Private Sub Command1_Click()
Call HideClock
End Sub
Private Sub Command2_Click()
Call ShowClock
End Sub
مخفی و ظاهر کردن آیکونهای Notification Area
کد: Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Private Const SW_HIDE = 0
Private Const SW_NORMAL = 1
Private Sub HideNAIcon()
Dim h As Long
h = FindWindow("Shell_TrayWnd", vbNullString)
h = FindWindowEx(h, 0, "TrayNotifyWnd", vbNullString)
h = FindWindowEx(h, 0, "SysPager", vbNullString)
ShowWindow h, SW_HIDE
End Sub
Private Sub ShowNAIcon()
Dim h As Long
h = FindWindow("Shell_TrayWnd", vbNullString)
h = FindWindowEx(h, 0, "TrayNotifyWnd", vbNullString)
h = FindWindowEx(h, 0, "SysPager", vbNullString)
ShowWindow h, SW_NORMAL
End Sub
Private Sub Command1_Click()
Call HideNAIcon
End Sub
Private Sub Command2_Click()
Call ShowNAIcon
End Sub
الان می تونید اکثر اجزای Taskbar رو مخفی یا ظاهر کنید
اجزای دیگر رو هم می تونید با به دست آوردن کلاس آن مخفی یا ظاهر و ... کنید
ما که دیگه توی ایران ویج پیر شدیم کم کم باید جامون رو بدیم به جوونا
|
|