2008-11-07 VB.Net 如何鎖定鍵盤及滑鼠 15109 0 VB.Net / C#.Net / 摘要:VB.Net 如何鎖定鍵盤及滑鼠 VB.Net 如何鎖定鍵盤及滑鼠Sample 中, 按下 Button 後 , 鍵盤及滑鼠將被鎖住10秒 Public Class Form1 Private Declare Function BlockInput Lib "user32" _ (ByVal fBlock As Integer) As Integer Private Sub Button1_Click(ByVal s As Object, ByVal e As EventArgs) Handles Button1.Click BlockInput(True) ' 鎖 System.Threading.Thread.Sleep(10000) ' 等10秒 BlockInput(False) ' 開 End Sub End Class 回首頁