l4tr0d3ctism
دوشنبه 01 تیر 1388, 01:02 صبح
می خوام کیبرد رو قفل کنم ولی مثل اینکه باید روی تک تک دکمه ها کار کنم و clasname هر دکمه رو پیدا کنم تا بتونم اون دکمه رو قفل کنم حالا چطور میشه پیدا کنم ؟
خیلی لازم دارم لطفا راهنمایی کنید ؟
کد این هست
Private Declare Function FindWindow Lib "User32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) 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 Declare Function EnableWindow Lib "user32" Alias "EnableWindow" (ByVal hwnd As Long, ByVal fEnable As Long) As Long
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Integer, ByVal lParam As Long) As Long
Const WM_CLOSE = &H10
Dim MainClass As Long
Dim ChildClass As Long
MainClass = FindWindow("Shell_TrayWnd", vbNullString)
ChildClass = FindWindowEx(MainClass, 0&, "Button", vbNullString)
'Disable window
Call EnableWindow(ChildClass, False)]
و class name دکمه های کیبرد باید در جای قسمت قرمز قرار بگیره ولی نمی دونم classname ها رو که گفتید از کجا و چگونه گیر بیارم راهنمایی کنید ؟؟؟؟؟؟؟؟؟؟
خیلی لازم دارم لطفا راهنمایی کنید ؟
کد این هست
Private Declare Function FindWindow Lib "User32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) 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 Declare Function EnableWindow Lib "user32" Alias "EnableWindow" (ByVal hwnd As Long, ByVal fEnable As Long) As Long
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Integer, ByVal lParam As Long) As Long
Const WM_CLOSE = &H10
Dim MainClass As Long
Dim ChildClass As Long
MainClass = FindWindow("Shell_TrayWnd", vbNullString)
ChildClass = FindWindowEx(MainClass, 0&, "Button", vbNullString)
'Disable window
Call EnableWindow(ChildClass, False)]
و class name دکمه های کیبرد باید در جای قسمت قرمز قرار بگیره ولی نمی دونم classname ها رو که گفتید از کجا و چگونه گیر بیارم راهنمایی کنید ؟؟؟؟؟؟؟؟؟؟