你除非写插件,用户访问你的BS页面的时候要安装这个插件,然后由这个插件去读取客户端本地程序。不过这个插件目测很多浏览器是不支持的。一般只有IE可以用。
专业成都网站建设公司,做排名好的好网站,排在同行前面,为您带来客户和效益!创新互联建站为您提供成都网站建设,五站合一网站设计制作,服务好的网站设计公司,网站设计、做网站负责任的成都网站制作公司!
使用VB.net编写屏蔽热键的方法有很多中,比如说使用系统的API函数,也可以使用钩子来进行屏蔽.还有一种就是.net带的一种方法,首先来判断所按下去的键,然后再执行操作等事件.比如说:if (e.keycode==keys.D){e.handle=true}在keydown事件里面处理!这样就可以屏蔽了D键. 实例:if ((Control.ModifierKeys == Keys.Alt) (e.KeyCode == Keys.F4))
{
e.Handled = true;
}还有一种办法就是不通过屏蔽热键来实现,就是通过设置焦点.你可以把你程序窗口设置为主焦点,这样其他程序一般就无法在你的程序前面了.实现屏蔽的作用.至于任务管理器的话可以通过杀掉进程的办法做到.如下: Process[] p = Process.GetProcesses(); foreach (Process p1 in p)
{
try
{
if (p1.ProcessName.ToLower().Trim() == "taskmgr")//这里判断是任务管理器
{
p1.Kill();
return;
}
}
catch
{
return;
}
}}以上是使用C#编写的,稍微改下就可以了,在,NET里面都差不多!
按你说的方式,需要用到钩子
建议你用File类进行操作,保存为TXT文件
祝好运,望采纳
添加一文本框;一定时器,interval=10或更小Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
Dim tim As Long
Function GetKeyName(KeyCodes) As String
Select Case KeyCodes
Case 1: GetKeyName = "鼠标左键"
Case 2: GetKeyName = "鼠标右键"
Case 4: GetKeyName = "鼠标中键"
Case 8: GetKeyName = "Back Space"
Case 9: GetKeyName = "Tab"
Case 12: GetKeyName = "(5)"
Case 13: GetKeyName = "Enter"
Case 16: GetKeyName = "Shift"
Case 17: GetKeyName = "Ctrl"
Case 18: GetKeyName = "Alt"
Case 19: GetKeyName = "Pause Break"
Case 20: GetKeyName = "Caps Lock"
Case 27: GetKeyName = "Esc"
Case 32: GetKeyName = "Space"
Case 33: GetKeyName = "Page Up"
Case 34: GetKeyName = "Page Down"
Case 35: GetKeyName = "End"
Case 36: GetKeyName = "Home"
Case 37: GetKeyName = "Left"
Case 38: GetKeyName = "Up"
Case 39: GetKeyName = "Right"
Case 40: GetKeyName = "Down"
Case 44: GetKeyName = "Print Screen"
Case 45: GetKeyName = "Insert"
Case 46: GetKeyName = "Delete"
Case 48 To 57: GetKeyName = KeyCodes - 48
Case 65 To 90: GetKeyName = Chr(KeyCodes)
Case 91: GetKeyName = "左开始"
Case 92: GetKeyName = "右开始"
Case 93: GetKeyName = "属性"
Case 96 To 105: GetKeyName = KeyCodes - 96
Case 106: GetKeyName = "*"
Case 107: GetKeyName = "+"
Case 109: GetKeyName = "-"
Case 110: GetKeyName = "."
Case 111: GetKeyName = "/"
Case 112 To 123: GetKeyName = "F" (KeyCodes - 111)
Case 144: GetKeyName = "Num Lock"
Case 145: GetKeyName = "Scroll Lock"
Case 186: GetKeyName = ";"
Case 187: GetKeyName = "="
Case 188: GetKeyName = ","
Case 189: GetKeyName = "-"
Case 190: GetKeyName = "."
Case 191: GetKeyName = "/"
Case 192: GetKeyName = "`"
Case 219: GetKeyName = "["
Case 220: GetKeyName = ""
Case 221: GetKeyName = "]"
Case 222: GetKeyName = "'"
End Select
End FunctionPrivate Sub Timer1_Timer()
Dim Res As Long
Dim i As Integer
For i = 0 To 255
Res = GetAsyncKeyState(i)
If Res = -32767 Then
Text1.Text = Text1.Text GetKeyName(i) Space(15 - Len(GetKeyName(i))) "键值" i Space(10 - Len(Str(i))) Time Chr(13) Chr(10)
End If
Next i
End Sub
.net的代码真木有写过。
VB 可以屏蔽 包括ctrl+alt+del在内的所有键盘按键消息
其实你只要后台截获按键的消息后,直接屏蔽掉就可以了。
VB代码我有 net木有。