vb text 光标通过命令按钮做上下移动的程序怎么编写哇?求大神指导
这是我要做的开发面板,要图上那4个方向控制文本框里的光标移动,左右已经搞定了,就是上下总是想不出来。。...
这是我要做的开发面板,要图上那4个方向控制文本框里的光标移动,左右已经搞定了,就是上下总是想不出来。。
展开
3个回答
展开全部
Private Sub Command1_Click() '上
Text1.SetFocus
SendKeys "{Up}"
End Sub
Private Sub Command2_Click() '下
Text1.SetFocus
SendKeys "{Down}"
End Sub
Private Sub Command3_Click() '左
Text1.SetFocus
SendKeys "{Left}"
End Sub
Private Sub Command4_Click() '右
Text1.SetFocus
SendKeys "{Right}"
End Sub
Text1.SetFocus
SendKeys "{Up}"
End Sub
Private Sub Command2_Click() '下
Text1.SetFocus
SendKeys "{Down}"
End Sub
Private Sub Command3_Click() '左
Text1.SetFocus
SendKeys "{Left}"
End Sub
Private Sub Command4_Click() '右
Text1.SetFocus
SendKeys "{Right}"
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
Private Sub Command1_Click()
Text1.SetFocus
SendKeys "{DOWN}"
End Sub
Private Sub Command2_Click()
Text1.SetFocus
SendKeys "{UP}"
End Sub
Private Sub Form_Load()
Text1.Text = "adfa" & vbCrLf & "adfadffff" & vbCrLf & "aklllllll"
End Sub
Text1.SetFocus
SendKeys "{DOWN}"
End Sub
Private Sub Command2_Click()
Text1.SetFocus
SendKeys "{UP}"
End Sub
Private Sub Form_Load()
Text1.Text = "adfa" & vbCrLf & "adfadffff" & vbCrLf & "aklllllll"
End Sub
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
可以向文本框发送按键消息
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询