你可能感兴趣的试题
Private Sub Text1_KeyPress(KeyAscii As Intege If KeyAscii < 65 Or KeyAscii > 90 Then MsgBox "请输入大写字母" KeyAscii = 0 End If End Sub Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Intege If KeyCode < 65 Or KeyCode > 90 Then MsgBox "请输入大写字母" KeyCode = 0 End If End Sub Private Sub Text1_MouseDown(Button As Integer,_ Shift As Integer, X As Single, Y As Singl If Asc(Text1.Tex < 65 Or Asc(Text1.Tex > 90 Then MsgBox "请输入大写字母" End If End Sub Private Sub Text1_Change() If Asc(Text1.Tex > 64 And Asc(Text1.Tex < 91 Then MsgBox "请输入大写字母" End If End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer) If KeyAscii<65 Or KeyAscii>90 Then MsgBox"请输入大写字母" KeyAscii=0 End If End Sub Private Sub Text1_KeyDown(KeyCode As Integer,Shift As Integer) If KeyCode<65 Or KeyCode>90 Then MsgBox"请输入大写字母“ KeyCode=0 End If End Sub Private Sub Text1_MouseDown(Button As Integer,Shift As Integer,X As Single,Y As Single) If Asc(Text1.Text)<65 Or Asc(Text1.Text)>90 Then MsgBox"请输入大写字母" End If End Sub Private Sub Text1_Change() If Asc(Text1.Text)>64 And Asc(Text1.Text)<91 Then MsgBox"请输入大写字母" End If End Sub
大写字符会伸展到基线(BASELIN以下但不高于大写字母高度(CAPHEIGHT)线 大写字符会伸展到大写字母高度(CAPHEIGHT)线以上但不低于基线(BASELIN 大写字符会伸展到大写字母高度(CAPHEIGHT)线以上,其余部分都在基线(BASELIN以上 大写字符在大写字母高度(CAPHEIGHT)线和基线(BASELIN之间
按住Shift键的同时输入字母 按下CapsLock键以后输入字母 在浮动的“控制板”中将小写字母改为大写 选择“文字>文字样式>正常”就可以变成大写字母
用小写字母 用大写字母 小写或大写字母或两者相结合 不能通过键盘输入命令
Private SubText1_KeyPress(KeyAscii As Integer)
If KeyAscii<65 or KeyAscii>90 Then
MsgBox“请输入大写字母”
KeyAscii=0
End If
End Sub
B. Private Sub Text1_KeyDown( KeyCode As Integer,Shift As Integer)
If KeyCode < 65 or KeyCode > 90 Then
Msgbox“请输入大写字母”
KeyCode = 0
End If
End Sub
C. Private SuB Text1_MouseDown( Button AS Integer,_
Shift As lnteger,X As Single,Y As Single)
If Asc ( Text1. Text) < 65 or Asc ( Text1.Text) > 90 Then
Msgbox“请输入大写字母”
End If
End Sub
D. Private Sub Text1_Change( )
If Asc(Text1.Text) >64 And Asc(Text1.Text) >9l Then
Msgbox“请输入大写字母”
End lf
End Sub
退格键,按下后删除一个字符 退出键,按下后退出当前程序 锁定大写字母键,按下后可连续输入大写字母 组合键,与其他键组合才有作用
Private Sub Text1_KeyPress(KeyAscii As Intege If Key Ascii<65 Or KeyAscii>90 Then MsgBox“请输入大写字母” KeyAscii=0 End If End Sub Pfivate Sub Text1_KeyDown(KeyCode As Integer,Shift As Intege If KeyCode<65 Or KeyCode>90 Then MsgBox“请输入大写字母” KeyCode=0 End If End Sub Private Sub Text1_MouseDown(Button As Integer,Shift As Integer,X As Single, Y As Singl If Asc(Text1.Tex<65 Or Asc(Text1.Tex>90 Then MsgBox“请输入大写字母” End If End Sub Private Sub Text1_Change() If Asc(Text1.Tex>64 And Asc(Text1.Tex<91 Then MsgBox“请输入大写字母” End If End Sub
Private Sub Text1_ KeyPress (KeyAscii As Intege IfKeyAscii < 65 Or KeyAscii > 9t Then MsgBox “请输入大写字母” End If End sub Private Sub Text1_ KeyDown (KeyCode As Integer, Shift As Intege IfKeyCode < 65 Or KeyCode > 91 Then MsgBox “请输入大写字母” End If End sub Private Sub Text1_ MouseDown (Button As Integer, _ Shift As Integer, X As Single, YAs Singl IfAsc (Text1.Tex < 65 Or Asc (Text1. Tex > 91 Then MsgBox “请输入大写字母” End If End sub Private Sub Text1_ Change() IfAsc(Text 1.Tex < 65 Or Asc(Text1. Tex > 91 Then MsgBox “请输入大写字母” End If End sub
Private Sub Text1_KeyPress(KeyAscii As Intege IfKeyAscii<65 Or KeyAscii>90 Then MsgBox“请输入大写字母” KeyAscii=0 End If End Sub Private Sub Text1_KeyDown(KeyCode As Integer,Shift As Intege If KeyCode<65 Or KeyCode>90 Then MsgBox“请输入大写字母” KeyCode=0 End If End Sub Private Sub Text1 MouseDown(Button As Integer,Shift As Integer,X As Single,Y As Singl, If Asc(Text1.Tex<65 Or Asc(Text1.Tex>90 Then MsgBox“请输入大写字母” End If End Sub Private Sub Text1_Change() If Asc(Text1.Tex>64 And Asc(Text1.Tex<91 Then MsgBox“请输入大写字母” End If End Sub
Private Sub Text1_KeyPress(KeyAscii As Intege If KeyAscii<65 Or KeyAscii>90 Then MsgBox"请输入大写字母" KeyAscii=0 End If End Sub Private Sub Text1_KeyDown(Keycode As Integer, Shift As Intege If KeyCode<65 Or Keycode>90 Then MsgBox"请输入大写字母" KcyCode=0 End If End Sub Private Sub Text1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Singl If Asc(Text1. Tex<65 Or Asc(Text1. Tex>90 Then MsgBox"请输入大写字母" End If End Sub Private Sub Text1_Change() If Asc(Text1. Tex>64 Or Asc(Text1. Tex<91 Then MsgBox"请输入大写字母" End If End Sub