真实的国产乱ⅩXXX66竹夫人,五月香六月婷婷激情综合,亚洲日本VA一区二区三区,亚洲精品一区二区三区麻豆

成都創(chuàng)新互聯(lián)網(wǎng)站制作重慶分公司

vb.net鍵盤f1 vb ctrl+c

VB 編程 設F1~F12的快捷鍵

一樓的方法比較巧妙,不過樓上的好像不行

創(chuàng)新互聯(lián)公司自2013年創(chuàng)立以來,是專業(yè)互聯(lián)網(wǎng)技術服務公司,擁有項目成都網(wǎng)站制作、網(wǎng)站設計網(wǎng)站策劃,項目實施與項目整合能力。我們以讓每一個夢想脫穎而出為使命,1280元渭城做網(wǎng)站,已為上家服務,為渭城各地企業(yè)和個人服務,聯(lián)系電話:028-86922220

最完善的方法當然做鍵盤勾子

簡單點的,就在Form的KeyDown屬性里做就OK了

也要把窗口的keypreview設為True,然后粘貼下面的代碼:

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)

if keycode=vbkeyf3 then check1.value=check1.value xor 1

End Sub

就一句

vb.net 怎么返回回車鍵、空格鍵、F1-F12這些鍵的ASCII值啊?

自己做個試驗就行了:

Public?Class?Form1

'?在窗體上放個?Label1

Private?Sub?Form1_KeyDown(ByVal?sender?As?Object,?ByVal?e?As?System.Windows.Forms.KeyEventArgs)?Handles?Me.KeyDown

Lable1.Text?=?"KeyCode=?"??e.KeyCode.ToString??vbCrLf

Lable1.Text?=?"KeyData=?"??e.KeyData.ToString??vbCrLf

Lable1.Text?=?"KeyValue=?"??e.KeyValue.ToString

End?Sub

End?Class

運行起來,自己按鍵盤試試就知道了。

VB.net 軟鍵盤 制作

Public Class Form2

Private Sub Form2_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

AddHandler Label1.MouseEnter, AddressOf LabelMouseEnter

AddHandler Label2.MouseEnter, AddressOf LabelMouseEnter

AddHandler Label1.MouseLeave, AddressOf LabelMouseLeave

AddHandler Label2.MouseLeave, AddressOf LabelMouseLeave

AddHandler Label1.MouseDown, AddressOf LabelMouseDown

AddHandler Label2.MouseDown, AddressOf LabelMouseDown

End Sub

Private Sub LabelMouseEnter(ByVal sender As Object, ByVal e As System.EventArgs)

Dim c As Label = DirectCast(sender, Label)

c.BackColor = Color.DodgerBlue

End Sub

Private Sub LabelMouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs)

Dim c As Label = DirectCast(sender, Label)

Form1.TextBox1.Text = c.Text

End Sub

Private Sub LabelMouseLeave(ByVal sender As Object, ByVal e As System.EventArgs)

Dim c As Label = DirectCast(sender, Label)

c.BackColor = SystemColors.Control

End Sub

End Class


網(wǎng)站標題:vb.net鍵盤f1 vb ctrl+c
URL鏈接:http://weahome.cn/article/hgdjsd.html

其他資訊

在線咨詢

微信咨詢

電話咨詢

028-86922220(工作日)

18980820575(7×24)

提交需求

返回頂部