DTPicker控件在KeyPress事件中,日期格式为 2004-08-14,回车后,焦点自动移到2004上,再回车,焦点就不移动了,我想让回车把焦点移到08,

潇风逸雨 2004-08-16 07:50:41
DTPicker控件在KeyPress事件中,日期格式为 2004-08-14,回车后,焦点自动移到2004上,再回车,焦点就不移动了,我想让回车把焦点移到08,然后14,再下一个控件上,这个要怎么实现呢?多谢
...全文
149 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
starsoulxp 2004-08-17
  • 打赏
  • 举报
回复
Private Sub DTPicker1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode=13 Then
SendKeys "{Right}"
End If
End Sub
cansum396 2004-08-16
  • 打赏
  • 举报
回复
if keycode=13 then sendkeys "{right}"
northwolves 2004-08-16
  • 打赏
  • 举报
回复
Dim counts As Integer
Private Sub DTPicker1_KeyDown(KeyCode As Integer, Shift As Integer)

If KeyCode = vbKeyReturn Then
counts = (counts + 1) Mod 3
If counts = 2 Then
SendKeys "{tab}"
Else
SendKeys "{right}"
End If
End If
End Sub
simonlee2003 2004-08-16
  • 打赏
  • 举报
回复
我好像记得tab可以换过去 看能不能keyascii=13时 转成tab响应

具体没有是是过,这只是一个想法。

1,451

社区成员

发帖
与我相关
我的任务
社区描述
VB 控件
社区管理员
  • 控件
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧