|
E学委:sunjing-zxl 交作业
代码中的"sunjing"是窗体名字
- 'esc=27,z=90,x=88
- 'shift 是按下shift(值为1) or ctrl(值为2)或alt(值为3)
- Private Sub UserForm_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
- If KeyCode = 27 Then
- Unload sunjing
- ElseIf Shift = 2 Then
- If KeyCode = 90 Then
- sunjing.Height = sunjing.Height + 10
- ElseIf KeyCode = 88 Then
- sunjing.Height = sunjing.Height - 10
- End If
- End If
- End Sub
- ' button 值按左键返回1,按右键返回2,按中键返回4
- ' shift 按Shift返回1,按ctrl返回2,shift+ctrl返回3,Atl按回4
- ' X,Y 是指点击的位置
- Private Sub UserForm_MouseDown(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
- If Button = 1 And Shift = 3 Then
- Unload sunjing
- End If
- End Sub
复制代码
|
评分
-
查看全部评分
|