VB-TabIndex、GotFocus、SetFocus
生活随笔
收集整理的這篇文章主要介紹了
VB-TabIndex、GotFocus、SetFocus
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
1、tabIndex
tabIndex是 設置 窗體中 對象 響應 tab 鍵 的順序值
例如 :有3個 文本框
text1 的tabIndex 為 2
text2 的tabIndex 為 1
text3 的tabIndex 為 0,
運行程序,焦點首先落在 text3里,按 tab鍵 光標會跑到text2,再按一次才會跑到text1
2、GotFocus
是事件,當焦點進入文本框里觸發該事件.
3、SetFocus
是方法,該方法把輸入光標(焦點)移動指定的文本框中.
例子:
private sub command1_click()
if(text1.text=text2.text) then
text3.setfocus
end if
end sub
private sub text3_getfocus()
text3.text=””
end sub
總結
以上是生活随笔為你收集整理的VB-TabIndex、GotFocus、SetFocus的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 韶音耳机连不上电脑_蓝牙耳机突然连接不上
- 下一篇: 使用svn时找到项目下隐藏的.svn文件