7 个解决方案
#1
textbox有个setfocus函数,可以实现你的功能
#2
Dim an As Boolean '设置command1被按下的标志
Private Sub Command1_Click() '按下按钮时,焦点在两个文本框切换
If an = False Then
Text2.SetFocus 'text2获得焦点
an = True
Else
Text1.SetFocus 'text1获得焦点
an = False
End If
End Sub
#3
Option Explicit
Dim ConFocus As Boolean
Private Sub Command1_Click()
ConFocus = Not ConFocus
If ConFocus Then
Text2.SetFocus
Else
Text1.SetFocus
End If
End Sub
#4
自己应经解决
#5
楼主高手也!
#6
刚才看了那么多朋友的程序,感觉这个大家庭真是太好了,人多智慧多,力量大。
static i as integer
if i mod 2 = 0 then
text2.setfocus
elseif i mod 2 =1 then
text1.setfocus
end if
在此谢谢各位朋友,以后小弟再有问题,还请各位多帮忙。
static i as integer
if i mod 2 = 0 then
text2.setfocus
elseif i mod 2 =1 then
text1.setfocus
end if
在此谢谢各位朋友,以后小弟再有问题,还请各位多帮忙。
#7
你的方法真的很经典,我只是个初学者,以后有什么问题还请您多帮忙。谢谢
#1
textbox有个setfocus函数,可以实现你的功能
#2
Dim an As Boolean '设置command1被按下的标志
Private Sub Command1_Click() '按下按钮时,焦点在两个文本框切换
If an = False Then
Text2.SetFocus 'text2获得焦点
an = True
Else
Text1.SetFocus 'text1获得焦点
an = False
End If
End Sub
#3
Option Explicit
Dim ConFocus As Boolean
Private Sub Command1_Click()
ConFocus = Not ConFocus
If ConFocus Then
Text2.SetFocus
Else
Text1.SetFocus
End If
End Sub
#4
自己应经解决
#5
楼主高手也!
#6
刚才看了那么多朋友的程序,感觉这个大家庭真是太好了,人多智慧多,力量大。
static i as integer
if i mod 2 = 0 then
text2.setfocus
elseif i mod 2 =1 then
text1.setfocus
end if
在此谢谢各位朋友,以后小弟再有问题,还请各位多帮忙。
static i as integer
if i mod 2 = 0 then
text2.setfocus
elseif i mod 2 =1 then
text1.setfocus
end if
在此谢谢各位朋友,以后小弟再有问题,还请各位多帮忙。
#7
你的方法真的很经典,我只是个初学者,以后有什么问题还请您多帮忙。谢谢