VBGood网站全文搜索 Google

搜索VBGood全站网页(全文搜索)

VB爱好者乐园(VBGood)

 找回密码
 立即注册
搜索
查看: 17009|回复: 66

这就是我用VB6制作的屏幕键盘。

[复制链接]
 楼主| 发表于 2005-11-7 14:40:52 | 显示全部楼层
[attachmentid=236]<br /><br />只可惜在98、95里头用不成。<br />在ME、NT、2000、XP、2003里头运行到也良好。<br /><br />噫,今天上传附件成功了,那就好,知道大家编程编累了,来,换换脑子,我再给各位上传个经典小游戏----超级马里奥。<br />这可是我好不容易找到的一个无病毒、加强版的哦。[attachmentid=237]

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
回复 支持 反对

使用道具 举报

发表于 2005-11-7 15:08:48 | 显示全部楼层
不错~~!不错~~~,麻烦把代码贴出来供大家学习,谢谢!<br /><br />
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-11-7 15:42:35 | 显示全部楼层
只有代码不行呀,你不知道制作这个键盘的界面有多麻烦,改天我把控件和代码整理一下,贴上来。<br /><br />Option Explicit<br />Rem 转移输入焦点的声明<br />rivate Declare Function GetWindowLong Lib &quot;user32&quot; Alias &quot;GetWindowLongA&quot; (ByVal hwnd As Long, ByVal nIndex As Long) As Long<br />rivate Declare Function SetWindowLong Lib &quot;user32&quot; Alias &quot;SetWindowLongA&quot; (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long<br /><br />Rem 窗口置顶的声明<br />rivate Declare Function SetWindowPos Lib &quot;user32&quot; (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal X As Long, ByVal Y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long<br /><br />Rem 移动没有标题栏窗体的声明<br />Private Declare Function ReleaseCapture Lib &quot;user32&quot; () As Long<br />Private Declare Function SendMessage Lib &quot;user32&quot; Alias &quot;SendMessageA&quot; (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long<br /><br />Rem 模拟按键声明<br />Private Declare Sub keybd_event Lib &quot;user32&quot; (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)<br /><br />Private Declare Function GetKeyState Lib &quot;user32&quot; (ByVal nVirtKey As Long) As Integer<br /><br />Rem 禁止本窗体拥有输入焦点的常数<br />Private Const HWND_NOTOPMOST = -2<br />Private Const WS_DISABLED = &amp;H8000000<br />Private Const GWL_EXSTYLE = (-20)<br />Private Const GWL_STYLE = (-16)<br /><br />Rem 窗口置顶的常数<br />Private Const HWND_TOPMOST = -1<br />Private Const SWP_NOACTIVATE = &amp;H10<br />Private Const SWP_NOMOVE = &amp;H2<br />Private Const SWP_NOSIZE = &amp;H1<br />Private Const SWP_SHOWWINDOW = &amp;H40<br /><br />Rem 移动没有标题栏窗体的常数<br />Private Const HTCAPTION = 2<br />Private Const WM_NCLBUTTONDOWN = &amp;HA1<br /><br />Rem 模拟按钮常数<br />Private Const KEYEVENTF_KEYUP = &amp;H2<br /><br />Rem 以下是程序执行主体部分<br />Rem 窗体调用时置顶,且禁止拥有输入焦点<br />Private Sub Form_Load()<br />    Me.Show<br />    小写字母<br />    下档符号<br />    数字小键盘<br />    数字锁.SetFocus<br />    SetWindowPos Me.hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOACTIVATE Or SWP_SHOWWINDOW Or SWP_NOMOVE Or SWP_NOSIZE<br />    SetWindowLong Me.hwnd, GWL_EXSTYLE, GetWindowLong(Me.hwnd, GWL_EXSTYLE) Or WS_DISABLED<br />End Sub<br /><br />Rem 鼠标移动到窗体上时,窗体置顶<br />Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)<br />    SetWindowPos Me.hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOACTIVATE Or SWP_SHOWWINDOW Or SWP_NOMOVE Or SWP_NOSIZE<br />End Sub<br /><br />Rem 移动没有标题栏窗体<br />Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)<br />    ReleaseCapture<br />    SendMessage hwnd, WM_NCLBUTTONDOWN, HTCAPTION, 0&amp;<br />End Sub<br /><br />Rem 窗体重现时,设置其位置在屏幕中下方且置顶<br />Private Sub Form_Paint()<br />    SetWindowPos Me.hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOACTIVATE Or SWP_SHOWWINDOW Or SWP_NOMOVE Or SWP_NOSIZE<br />    Me.Left = Screen.Width / 2 - Me.Width / 2<br />    Me.Top = Screen.Height - Me.Height - 450<br />End Sub<br /><br />Rem 防止执行多次<br />Private Sub Form_Initialize()<br />    If App.PrevInstance Then End<br />End Sub<br /><br />Rem 说明<br />Private Sub Form_DblClick()<br />    MsgBox &quot;1.气球提示:鼠标指针指向某个键,停留片该,将会显示该键的英文全称或中文全称。&quot; _<br />    &amp; Chr(13) &amp; &quot;2.指法提示:鼠标指针的形状在每个键上都根据相应指法发生变化。&quot; _<br />    &amp; Chr(10) &amp; &quot;3.高亮提示:按下某个键时,该键会变得高亮;如果按下的是开关键,相应的指示灯也会变得高亮。&quot; _<br />    &amp; Chr(13) &amp; &quot;4.换档提示:当按下 Caps Lock 、Shift 、Num Lock 键时,相应的,大写字母、上档符号、小键盘数字会突出显示;&quot; _<br />    &amp; &quot;反之,当弹起 Caps Lock 、Shift 、Num Lock 键时,相应的,小写字母、下档符号、小键盘光标键会突出显示。&quot; _<br />    &amp; Chr(13) &amp; &quot;5.随手移动:在键盘背景处用鼠标拖动,可移动键盘。&quot; _<br />    &amp; Chr(13) &amp; &quot;6.显示说明:在键盘背景处用鼠标双击,可显示本说明。&quot; _<br />    &amp; Chr(13) _<br />    &amp; Chr(13) &amp; &quot;                  版 本:1.0.0.5&quot; _<br />    &amp; Chr(13) &amp; &quot;                  制作人:盛 华&quot; _<br />    &amp; Chr(13) &amp; &quot;                  地 址:陕西省安康市白河县&quot; _<br />    &amp; Chr(13) &amp; &quot;                  QQ号码:249498337 &quot; _<br />    &amp; Chr(13) &amp; &quot;                  E-Mail:ShengHua8@163.com&quot; _<br />    &amp; Chr(13) &amp; &quot;                  昵 称:周星骋&quot;, , &quot;仿 Microsoft 屏幕键盘使用说明&quot;<br />End Sub<br /><br />Rem 用控件数组向外部窗口发送按键信息<br />Private Sub SKB_Click(Index As Integer)<br />    keybd_event Index, 0, 0, 0<br />    keybd_event Index, 0, KEYEVENTF_KEYUP, 0<br />End Sub<br /><br />Rem 获得焦点键高亮<br />Private Sub SKB_GotFocus(Index As Integer)<br />    SKB(Index).BackColor = &amp;HFFE0&amp;<br />End Sub<br />Private Sub SKB_LostFocus(Index As Integer)<br />    SKB(Index).BackColor = vbWhite<br />End Sub<br /><br />Rem 三个控制键盘灯的键<br />Private Sub 大写锁_Click()<br />    If 大写锁.BackColor = &amp;HD9A16F Then<br />        大写锁.BackColor = &amp;HFFE0&amp;<br />        大写灯.ForeColor = &amp;HFFE0&amp;<br />        keybd_event 20, 0, 0, 0<br />        keybd_event 20, 0, KEYEVENTF_KEYUP, 0<br />        If 换档(160).BackColor = &amp;HFFE0&amp; Or 换档(161).BackColor = &amp;HFFE0&amp; Then<br />            小写字母<br />        Else<br />            大写字母<br />        End If<br />    Else<br />        大写锁.BackColor = &amp;HD9A16F<br />        大写灯.ForeColor = &amp;HD9A16F<br />        keybd_event 20, 0, 0, 0<br />        keybd_event 20, 0, KEYEVENTF_KEYUP, 0<br />        If 换档(160).BackColor = &amp;HFFE0&amp; Or 换档(161).BackColor = &amp;HFFE0&amp; Then<br />            大写字母<br />        Else<br />            小写字母<br />        End If<br />    End If<br />End Sub<br /><br />Private Sub 数字锁_Click()<br />    If 数字锁.BackColor = &amp;HD9A16F Then<br />        数字锁.BackColor = &amp;HFFE0&amp;<br />        数字灯.ForeColor = &amp;HFFE0&amp;<br />        keybd_event 144, 0, 0, 0<br />        keybd_event 144, 0, KEYEVENTF_KEYUP, 0<br />        If 换档(160).BackColor = &amp;HFFE0&amp; Or 换档(161).BackColor = &amp;HFFE0&amp; Then<br />            光标小键盘<br />        Else<br />            数字小键盘<br />        End If<br />    Else<br />        数字锁.BackColor = &amp;HD9A16F<br />        数字灯.ForeColor = &amp;HD9A16F<br />        keybd_event 144, 0, 0, 0<br />        keybd_event 144, 0, KEYEVENTF_KEYUP, 0<br />        光标小键盘<br />    End If<br /><br />End Sub<br />Private Sub 卷轴锁_Click()<br />    If 卷轴锁.BackColor = &amp;HD9A16F Then<br />        卷轴锁.BackColor = &amp;HFFE0&amp;<br />        卷轴灯.ForeColor = &amp;HFFE0&amp;<br />        keybd_event 145, 0, 0, 0<br />        keybd_event 145, 0, KEYEVENTF_KEYUP, 0<br />    Else<br />        卷轴锁.BackColor = &amp;HD9A16F<br />        卷轴灯.ForeColor = &amp;HD9A16F<br />        keybd_event 145, 0, 0, 0<br />        keybd_event 145, 0, KEYEVENTF_KEYUP, 0<br />    End If<br />End Sub<br /><br />Rem 四组成对的特殊键<br />Private Sub 控制_Click(Index As Integer)<br />    If 控制(Index).BackColor = &amp;HD9A16F Then<br />        控制(Index).BackColor = &amp;HFFE0&amp;<br />        keybd_event Index, 0, 0, 0<br />    Else<br />        控制(Index).BackColor = &amp;HD9A16F<br />        keybd_event Index, 0, KEYEVENTF_KEYUP, 0<br />    End If<br />End Sub<br /><br />Private Sub 转换_Click(Index As Integer)<br />    If 转换(Index).BackColor = &amp;HD9A16F Then<br />        转换(Index).BackColor = &amp;HFFE0&amp;<br />        keybd_event Index, 0, 0, 0<br />    Else<br />        转换(Index).BackColor = &amp;HD9A16F<br />        keybd_event Index, 0, KEYEVENTF_KEYUP, 0<br />    End If<br />End Sub<br /><br />Private Sub 徽标_Click(Index As Integer)<br />    If 徽标(Index).BackColor = &amp;HD9A16F Then<br />        徽标(Index).BackColor = &amp;HFFE0&amp;<br />        keybd_event Index, 0, 0, 0<br />    Else<br />        徽标(Index).BackColor = &amp;HD9A16F<br />        keybd_event Index, 0, KEYEVENTF_KEYUP, 0<br />    End If<br />End Sub<br /><br />Private Sub 换档_Click(Index As Integer)<br />    If 换档(Index).BackColor = &amp;HD9A16F Then<br />        换档(Index).BackColor = &amp;HFFE0&amp;<br />        keybd_event Index, 0, 0, 0<br />        上档符号<br />        If 大写灯.ForeColor = &amp;HFFE0&amp; Then<br />            小写字母<br />        Else<br />            大写字母<br />        End If<br />        光标小键盘<br />    Else<br />        换档(Index).BackColor = &amp;HD9A16F<br />        keybd_event Index, 0, KEYEVENTF_KEYUP, 0<br />        下档符号<br />        If 大写灯.ForeColor = &amp;HFFE0&amp; Then<br />            大写字母<br />        Else<br />            小写字母<br />        End If<br />        If 数字灯.ForeColor = &amp;HFFE0&amp; Then<br />            数字小键盘<br />        Else<br />            光标小键盘<br />        End If<br />    End If<br />End Sub<br /><br />Rem 弹出式快捷菜单键<br />Private Sub 快捷菜单_Click()<br />    keybd_event 93, 0, 0, 0<br />    keybd_event 93, 0, KEYEVENTF_KEYUP, 0<br />End Sub<br />Private Sub 快捷菜单_GotFocus()<br />    快捷菜单.BackColor = &amp;HFFE0&amp;<br />End Sub<br />Private Sub 快捷菜单_LostFocus()<br />    快捷菜单.BackColor = &amp;HD9A16F<br />End Sub<br /><br />Rem 小键盘回车<br />Private Sub 小回车_Click()<br />    keybd_event 13, 0, 0, 0<br />    keybd_event 13, 0, KEYEVENTF_KEYUP, 0<br />End Sub<br />Private Sub 小回车_GotFocus()<br />    小回车.BackColor = &amp;HFFE0&amp;<br />End Sub<br />Private Sub 小回车_LostFocus()<br />    小回车.BackColor = vbWhite<br />End Sub<br /><br />Rem 处理小键盘上每个按键<br />Private Sub 小键盘_GotFocus(Index As Integer)<br />    小键盘(Index).BackColor = &amp;HFFE0&amp;<br />End Sub<br />Private Sub 小键盘_LostFocus(Index As Integer)<br />    小键盘(Index).BackColor = vbWhite<br />End Sub<br />Private Sub 小键盘_Click(Index As Integer)<br />    If 数字锁.BackColor = &amp;HFFE0&amp; Then<br />        keybd_event Index, 0, 0, 0<br />        keybd_event Index, 0, KEYEVENTF_KEYUP, 0<br />    Else<br />        Call 小键盘光标(Index)<br />    End If<br />End Sub<br /><br />Rem 自定义子函数,使得小键盘变成光标<br />Sub 小键盘光标(ByVal NumIndex As Integer)<br />        Select Case NumIndex<br />            Case 96<br />                keybd_event 45, 0, 0, 0<br />                keybd_event 45, 0, KEYEVENTF_KEYUP, 0<br />            Case 97<br />                keybd_event 35, 0, 0, 0<br />                keybd_event 35, 0, KEYEVENTF_KEYUP, 0<br />            Case 98<br />                keybd_event 40, 0, 0, 0<br />                keybd_event 40, 0, KEYEVENTF_KEYUP, 0<br />            Case 99<br />                keybd_event 34, 0, 0, 0<br />                keybd_event 34, 0, KEYEVENTF_KEYUP, 0<br />            Case 100<br />                keybd_event 37, 0, 0, 0<br />                keybd_event 37, 0, KEYEVENTF_KEYUP, 0<br />            Case 101<br />            Case 102<br />                keybd_event 39, 0, 0, 0<br />                keybd_event 39, 0, KEYEVENTF_KEYUP, 0<br />            Case 103<br />                keybd_event 36, 0, 0, 0<br />                keybd_event 36, 0, KEYEVENTF_KEYUP, 0<br />            Case 104<br />                keybd_event 38, 0, 0, 0<br />                keybd_event 38, 0, KEYEVENTF_KEYUP, 0<br />            Case 105<br />                keybd_event 33, 0, 0, 0<br />                keybd_event 33, 0, KEYEVENTF_KEYUP, 0<br />            Case 110<br />                keybd_event 46, 0, 0, 0<br />                keybd_event 46, 0, KEYEVENTF_KEYUP, 0<br />        End Select<br />End Sub<br /><br />Rem 自定义子函数,使子母键突出显示大写<br />Sub 大写字母()<br />    SKB(65).Caption = &quot;A&quot; &amp; Chr(10) &amp; &quot;a&quot;<br />    SKB(66).Caption = &quot;B&quot; &amp; Chr(10) &amp; &quot;b&quot;<br />    SKB(67).Caption = &quot;C&quot; &amp; Chr(10) &amp; &quot;c&quot;<br />    SKB(68).Caption = &quot;D&quot; &amp; Chr(10) &amp; &quot;d&quot;<br />    SKB(69).Caption = &quot;E&quot; &amp; Chr(10) &amp; &quot;e&quot;<br />    SKB(70).Caption = &quot;F&quot; &amp; Chr(10) &amp; &quot;f&quot;<br />    SKB(71).Caption = &quot;G&quot; &amp; Chr(10) &amp; &quot;g&quot;<br />    SKB(72).Caption = &quot;H&quot; &amp; Chr(10) &amp; &quot;h&quot;<br />    SKB(73).Caption = &quot;I&quot; &amp; Chr(10) &amp; &quot;i&quot;<br />    SKB(74).Caption = &quot;J&quot; &amp; Chr(10) &amp; &quot;j&quot;<br />    SKB(75).Caption = &quot;K&quot; &amp; Chr(10) &amp; &quot;k&quot;<br />    SKB(76).Caption = &quot;L&quot; &amp; Chr(10) &amp; &quot;l&quot;<br />    SKB(77).Caption = &quot;M&quot; &amp; Chr(10) &amp; &quot;m&quot;<br />    SKB(78).Caption = &quot;N&quot; &amp; Chr(10) &amp; &quot;n&quot;<br />    SKB(79).Caption = &quot;O&quot; &amp; Chr(10) &amp; &quot;o&quot;<br />    SKB(80).Caption = &quot;P&quot; &amp; Chr(10) &amp; &quot;p&quot;<br />    SKB(81).Caption = &quot;Q&quot; &amp; Chr(10) &amp; &quot;q&quot;<br />    SKB(82).Caption = &quot;R&quot; &amp; Chr(10) &amp; &quot;r&quot;<br />    SKB(83).Caption = &quot;S&quot; &amp; Chr(10) &amp; &quot;s&quot;<br />    SKB(84).Caption = &quot;T&quot; &amp; Chr(10) &amp; &quot;t&quot;<br />    SKB(85).Caption = &quot;U&quot; &amp; Chr(10) &amp; &quot;u&quot;<br />    SKB(86).Caption = &quot;V&quot; &amp; Chr(10) &amp; &quot;v&quot;<br />    SKB(87).Caption = &quot;W&quot; &amp; Chr(10) &amp; &quot;w&quot;<br />    SKB(88).Caption = &quot;X&quot; &amp; Chr(10) &amp; &quot;x&quot;<br />    SKB(89).Caption = &quot;Y&quot; &amp; Chr(10) &amp; &quot;y&quot;<br />    SKB(90).Caption = &quot;Z&quot; &amp; Chr(10) &amp; &quot;z&quot;<br />End Sub<br />Rem 自定义子函数,使子母键突出显示小写<br />Sub 小写字母()<br />    SKB(65).Caption = &quot;A&quot; &amp; Chr(10) &amp; &quot;a&quot;<br />    SKB(66).Caption = &quot;B&quot; &amp; Chr(10) &amp; &quot;b&quot;<br />    SKB(67).Caption = &quot;C&quot; &amp; Chr(10) &amp; &quot;c&quot;<br />    SKB(68).Caption = &quot;D&quot; &amp; Chr(10) &amp; &quot;d&quot;<br />    SKB(69).Caption = &quot;E&quot; &amp; Chr(10) &amp; &quot;e&quot;<br />    SKB(70).Caption = &quot;F&quot; &amp; Chr(10) &amp; &quot;f&quot;<br />    SKB(71).Caption = &quot;G&quot; &amp; Chr(10) &amp; &quot;g&quot;<br />    SKB(72).Caption = &quot;H&quot; &amp; Chr(10) &amp; &quot;h&quot;<br />    SKB(73).Caption = &quot;I&quot; &amp; Chr(10) &amp; &quot;i&quot;<br />    SKB(74).Caption = &quot;J&quot; &amp; Chr(10) &amp; &quot;j&quot;<br />    SKB(75).Caption = &quot;K&quot; &amp; Chr(10) &amp; &quot;k&quot;<br />    SKB(76).Caption = &quot;L&quot; &amp; Chr(10) &amp; &quot;l&quot;<br />    SKB(77).Caption = &quot;M&quot; &amp; Chr(10) &amp; &quot;m&quot;<br />    SKB(78).Caption = &quot;N&quot; &amp; Chr(10) &amp; &quot;n&quot;<br />    SKB(79).Caption = &quot;O&quot; &amp; Chr(10) &amp; &quot;o&quot;<br />    SKB(80).Caption = &quot;P&quot; &amp; Chr(10) &amp; &quot;p&quot;<br />    SKB(81).Caption = &quot;Q&quot; &amp; Chr(10) &amp; &quot;q&quot;<br />    SKB(82).Caption = &quot;R&quot; &amp; Chr(10) &amp; &quot;r&quot;<br />    SKB(83).Caption = &quot;S&quot; &amp; Chr(10) &amp; &quot;s&quot;<br />    SKB(84).Caption = &quot;T&quot; &amp; Chr(10) &amp; &quot;t&quot;<br />    SKB(85).Caption = &quot;U&quot; &amp; Chr(10) &amp; &quot;u&quot;<br />    SKB(86).Caption = &quot;V&quot; &amp; Chr(10) &amp; &quot;v&quot;<br />    SKB(87).Caption = &quot;W&quot; &amp; Chr(10) &amp; &quot;w&quot;<br />    SKB(88).Caption = &quot;X&quot; &amp; Chr(10) &amp; &quot;x&quot;<br />    SKB(89).Caption = &quot;Y&quot; &amp; Chr(10) &amp; &quot;y&quot;<br />    SKB(90).Caption = &quot;Z&quot; &amp; Chr(10) &amp; &quot;z&quot;<br />End Sub<br />Rem 自定义子函数,使运算符号突出显示上档<br />Sub 上档符号()<br />    SKB(48).Caption = &quot;)&quot; &amp; Chr(10) &amp; &quot;0&quot;<br />    SKB(49).Caption = &quot;!&quot; &amp; Chr(10) &amp; &quot;1&quot;<br />    SKB(50).Caption = &quot;@&quot; &amp; Chr(10) &amp; &quot;2&quot;<br />    SKB(51).Caption = &quot;#&quot; &amp; Chr(10) &amp; &quot;3&quot;<br />    SKB(52).Caption = &quot;$&quot; &amp; Chr(10) &amp; &quot;4&quot;<br />    SKB(53).Caption = &quot;%&quot; &amp; Chr(10) &amp; &quot;5&quot;<br />    SKB(54).Caption = &quot;^&quot; &amp; Chr(10) &amp; &quot;6&quot;<br />    SKB(55).Caption = &quot;&&quot; &amp; Chr(10) &amp; &quot;7&quot;<br />    SKB(56).Caption = &quot;*&quot; &amp; Chr(10) &amp; &quot;8&quot;<br />    SKB(57).Caption = &quot;(&quot; &amp; Chr(10) &amp; &quot;9&quot;<br />    SKB(186).Caption = &quot;:&quot; &amp; Chr(10) &amp; &quot;;&quot;<br />    SKB(187).Caption = &quot;+&quot; &amp; Chr(10) &amp; &quot;=&quot;<br />    SKB(188).Caption = &quot;<&quot; &amp; Chr(10) &amp; &quot;,&quot;<br />    SKB(189).Caption = &quot;___&quot; &amp; Chr(10) &amp; &quot;-&quot;<br />    SKB(190).Caption = &quot;>&quot; &amp; Chr(10) &amp; &quot;.&quot;<br />    SKB(191).Caption = &quot;?&quot; &amp; Chr(10) &amp; &quot;/&quot;<br />    SKB(192).Caption = &quot;~&quot; &amp; Chr(10) &amp; &quot;`&quot;<br />    SKB(219).Caption = &quot;{&quot; &amp; Chr(10) &amp; &quot;[&quot;<br />    SKB(220).Caption = &quot;|&quot; &amp; Chr(10) &amp; &quot;\&quot;<br />    SKB(221).Caption = &quot;}&quot; &amp; Chr(10) &amp; &quot;]&quot;<br />    SKB(222).Caption = &quot;”&quot; &amp; Chr(10) &amp; &quot;&#39;&quot;<br />End Sub<br />Rem 自定义子函数,使运算符号突出显示下档<br />Sub 下档符号()<br />    SKB(48).Caption = &quot;)&quot; &amp; Chr(10) &amp; &quot;0&quot;<br />    SKB(49).Caption = &quot;&#33;&quot; &amp; Chr(10) &amp; &quot;1&quot;<br />    SKB(50).Caption = &quot;@&quot; &amp; Chr(10) &amp; &quot;2&quot;<br />    SKB(51).Caption = &quot;#&quot; &amp; Chr(10) &amp; &quot;3&quot;<br />    SKB(52).Caption = &quot;$&quot; &amp; Chr(10) &amp; &quot;4&quot;<br />    SKB(53).Caption = &quot;%&quot; &amp; Chr(10) &amp; &quot;5&quot;<br />    SKB(54).Caption = &quot;^&quot; &amp; Chr(10) &amp; &quot;6&quot;<br />    SKB(55).Caption = &quot;&amp;&amp;&quot; &amp; Chr(10) &amp; &quot;7&quot;<br />    SKB(56).Caption = &quot;*&quot; &amp; Chr(10) &amp; &quot;8&quot;<br />    SKB(57).Caption = &quot;(&quot; &amp; Chr(10) &amp; &quot;9&quot;<br />    SKB(186).Caption = &quot;:&quot; &amp; Chr(10) &amp; &quot;;&quot;<br />    SKB(187).Caption = &quot;+&quot; &amp; Chr(10) &amp; &quot;=&quot;<br />    SKB(188).Caption = &quot;&lt;&quot; &amp; Chr(10) &amp; &quot;,&quot;<br />    SKB(189).Caption = &quot;__&quot; &amp; Chr(10) &amp; &quot;-&quot;<br />    SKB(190).Caption = &quot;&gt;&quot; &amp; Chr(10) &amp; &quot;.&quot;<br />    SKB(191).Caption = &quot;?&quot; &amp; Chr(10) &amp; &quot;/&quot;<br />    SKB(192).Caption = &quot;~&quot; &amp; Chr(10) &amp; &quot;`&quot;<br />    SKB(219).Caption = &quot;{&quot; &amp; Chr(10) &amp; &quot;[&quot;<br />    SKB(220).Caption = &quot;|&quot; &amp; Chr(10) &amp; &quot;\&quot;<br />    SKB(221).Caption = &quot;}&quot; &amp; Chr(10) &amp; &quot;]&quot;<br />    SKB(222).Caption = &quot;″&quot; &amp; Chr(10) &amp; &quot;'&quot;<br />End Sub<br />Rem 自定义子函数,使小键盘突出显示数字<br />Sub 数字小键盘()<br />    小键盘(96).Caption = &quot;0&quot; &amp; Chr(10) &amp; &quot;插&quot;<br />    小键盘(97).Caption = &quot;1&quot; &amp; Chr(10) &amp; &quot;尾&quot;<br />    小键盘(98).Caption = &quot;2&quot; &amp; Chr(10) &amp; &quot;↓&quot;<br />    小键盘(99).Caption = &quot;3&quot; &amp; Chr(10) &amp; &quot;后&quot;<br />    小键盘(100).Caption = &quot;4&quot; &amp; Chr(10) &amp; &quot;←&quot;<br />    小键盘(101).Caption = &quot;5&quot; &amp; Chr(10) &amp; &quot; &quot;<br />    小键盘(102).Caption = &quot;6&quot; &amp; Chr(10) &amp; &quot;→&quot;<br />    小键盘(103).Caption = &quot;7&quot; &amp; Chr(10) &amp; &quot;头&quot;<br />    小键盘(104).Caption = &quot;8&quot; &amp; Chr(10) &amp; &quot;↑&quot;<br />    小键盘(105).Caption = &quot;9&quot; &amp; Chr(10) &amp; &quot;前&quot;<br />    小键盘(110).Caption = &quot;.&quot; &amp; Chr(10) &amp; &quot;删&quot;<br />End Sub<br />Rem 自定义子函数,使小键盘突出显示光标<br />Sub 光标小键盘()<br />    小键盘(96).Caption = &quot;0&quot; &amp; Chr(10) &amp; &quot;插&quot;<br />    小键盘(97).Caption = &quot;1&quot; &amp; Chr(10) &amp; &quot;尾&quot;<br />    小键盘(98).Caption = &quot;2&quot; &amp; Chr(10) &amp; &quot;↓&quot;<br />    小键盘(99).Caption = &quot;3&quot; &amp; Chr(10) &amp; &quot;后&quot;<br />    小键盘(100).Caption = &quot;4&quot; &amp; Chr(10) &amp; &quot;←&quot;<br />    小键盘(101).Caption = &quot;5&quot; &amp; Chr(10) &amp; &quot; &quot;<br />    小键盘(102).Caption = &quot;6&quot; &amp; Chr(10) &amp; &quot;→&quot;<br />    小键盘(103).Caption = &quot;7&quot; &amp; Chr(10) &amp; &quot;头&quot;<br />    小键盘(104).Caption = &quot;8&quot; &amp; Chr(10) &amp; &quot;↑&quot;<br />    小键盘(105).Caption = &quot;9&quot; &amp; Chr(10) &amp; &quot;前&quot;<br />    小键盘(110).Caption = &quot;.&quot; &amp; Chr(10) &amp; &quot;删&quot;<br />End Sub<br />
回复 支持 反对

使用道具 举报

发表于 2005-11-7 20:24:35 | 显示全部楼层
没有人顶,我顶
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-11-8 10:55:01 | 显示全部楼层
谢谢LiJun624和佳佳两位版主帮忙顶哦!
回复 支持 反对

使用道具 举报

发表于 2005-11-8 15:16:26 | 显示全部楼层
经典,值得学习~~~~~~~~<br /><br />
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-11-11 07:52:48 | 显示全部楼层
为什么称为经典呢?
回复 支持 反对

使用道具 举报

发表于 2005-11-11 12:04:11 | 显示全部楼层
因为这样的例子有很多.<br /><br />
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-11-11 17:19:39 | 显示全部楼层
呵呵,例子,搞笑!<br />我为了开发这个键盘想实现98下的功能,把网翻了个底朝天也没找到。包括微软用的第三方公司的屏幕键盘也不能在98下用嘛。
回复 支持 反对

使用道具 举报

发表于 2005-11-14 13:27:56 | 显示全部楼层
非常棒
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

文字版|手机版|小黑屋|VBGood  

GMT+8, 2022-7-1 18:34

VB爱好者乐园(VBGood)
快速回复 返回顶部 返回列表