 |
|
ใครพอมี Code ที่ไม่ให้ User สามารถกด Alt+Tab, และปุ่ม Window Key ได้บ้างฮะ ( Windows XP ) |
|
 |
|
|
 |
 |
|
ดูกระทู้นี้ครับ
Code (VB.NET)
Private Shared Function KeyBoardHookProc(ByVal nCode As Integer, ByVal wParam As Integer, ByVal lParam As IntPtr) As Integer
'All keyboard events will be sent here.
'Don't process just pass along.
If nCode < 0 Then
Return CallNextHookEx(HookId, nCode, wParam, lParam)
End If
'Extract the keyboard structure from the lparam
'This will contain the virtual <strong class="highlight">key</strong> and any flags.
'This is using the my.computer.keyboard to get the
'flags instead
Dim KeyboardSruct As KBDLLHOOKSTRUCT = Marshal.PtrToStructure(lParam, GetType(KBDLLHOOKSTRUCT))
If KeyboardSruct.vkCode = Vk_Tab And My.Computer.Keyboard.AltKeyDown Then
'Alt Tab
Return 1
ElseIf KeyboardSruct.vkCode = Vk_Escape And My.Computer.Keyboard.CtrlKeyDown Then
'Control Escape
Return 1
End If
'Send the message along
Return CallNextHookEx(HookId, nCode, wParam, lParam)
End Function
http://www.daniweb.com/software-development/vbnet/threads/359374
http://www.dreamincode.net/forums/topic/63119-disabling-keys-in-a-application/
|
 |
 |
 |
 |
Date :
2012-02-14 17:08:52 |
By :
webmaster |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
Mr.Win นี่มีความเพียรจริงๆเลย ยังอุตส่าห์ไปหาวิธีมาได้อีก 
|
 |
 |
 |
 |
Date :
2012-02-14 17:23:22 |
By :
watcharop |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ผมก็หาไปเรื่อยแหละครับ อิอิ
|
 |
 |
 |
 |
Date :
2012-02-14 17:27:38 |
By :
webmaster |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
งะ !! มีปัญหาเลย ผมจะเอาไปใช้งานอย่างไรดี เพราะว่าผมเขียน C# อะครับ ผมอยากจะเอามาใส่ที่ Form_Load ไม่อยากให้ User กดไรได้เลย ต้อง Login ก่อน ถึงค่อยปลด
ที่สำคัญก็จะมีพวก Alt+Ctrl+Del หรือ Ctrl+Shift+ESC, Alt+Tab, Alt+F4, Window Key ถูกล็อคไว้
Alt+Ctrl+Del หรือ Ctrl+Shift+ESC ล็อคได้แล้ว แต่พอกดมันชอบแจ้งเตือนกลับมาเป็น Message Alert มะรู้ปิดไงดี T^T ยากจังแหะ ปวดหัวเลย
ขอบคุณครับ.
|
ประวัติการแก้ไข 2012-02-15 00:47:21
 |
 |
 |
 |
Date :
2012-02-15 00:39:18 |
By :
masterskynet |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|