数学中国

 找回密码
 注册
搜索
热搜: 活动 交友 discuz
查看: 55|回复: 0

获得文本框的焦点并产生特殊符号的按钮的程序

[复制链接]
发表于 2026-4-15 18:14 | 显示全部楼层 |阅读模式
Private Sub Command5_Click()
If sng = 1 Then

Text1.SetFocus
Text1.SelText = "("
End If
If sng = 2 Then

Text2.SetFocus
Text2.SelText = "("
End If

If sng = 3 Then

Text3.SetFocus
Text3.SelText = "("
End If

If sng = 7 Then

Text7.SetFocus
Text7.SelText = "("
End If
   
   
   
End Sub

Private Sub Command6_Click()
If sng = 1 Then

Text1.SetFocus
Text1.SelText = "√"
End If
If sng = 2 Then

Text2.SetFocus
Text2.SelText = "√"
End If

If sng = 3 Then

Text3.SetFocus
Text3.SelText = "√"
End If

If sng = 7 Then

Text7.SetFocus
Text7.SelText = "√"
End If
   
   
   
End Sub

Private Sub Command7_Click()
If sng = 1 Then

Text1.SetFocus
Text1.SelText = ")"
End If
If sng = 2 Then

Text2.SetFocus
Text2.SelText = ")"
End If

If sng = 3 Then

Text3.SetFocus
Text3.SelText = ")"
End If

If sng = 7 Then

Text7.SetFocus
Text7.SelText = ")"
End If
   
   
   
End Sub

Private Sub Command8_Click()
If sng = 1 Then

Text1.SetFocus
Text1.SelText = "/"
End If
If sng = 2 Then

Text2.SetFocus
Text2.SelText = "/"
End If

If sng = 3 Then

Text3.SetFocus
Text3.SelText = "/"
End If

If sng = 7 Then

Text7.SetFocus
Text7.SelText = "/"
End If
   
   
   
End Sub
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|数学中国 ( 京ICP备05040119号 )

GMT+8, 2026-5-9 11:38 , Processed in 0.132032 second(s), 16 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表