| | |
Moving focus.....
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
![]() |
you have to set the TAB INDEX property of the option buttons. select the desired control and press F4 to open its properties,scroll down and find the tab index property. there you put the value. this value becomes the sequence number after which the focus will be moved to the desired control.
For example, if you set tab index of option1 to 0 and option 2 to 1, whenever you open the form the option 1 will be selected as default. then you can press tab to easily move the focus from option 1 to option 2. in the same way you can also set the tab index for other controls also.
hope this will help.
regards
Shouvik
For example, if you set tab index of option1 to 0 and option 2 to 1, whenever you open the form the option 1 will be selected as default. then you can press tab to easily move the focus from option 1 to option 2. in the same way you can also set the tab index for other controls also.
hope this will help.
regards
Shouvik
Shouvik_The_Expert_Coder
Have a problem? Don't worry just give me a call and I'll fix it for you.
Have a problem? Don't worry just give me a call and I'll fix it for you.
HI Rajesh,
If your need s about alternatively set focus to the option buttons,
then the tabindex propery mightnot complete your obligation
you can acheive it by using arrow keys(any one in four arrow keys...),
place the option buttons in a frame
now use arrow key to change selection(single key-no need to use different keys to move the selection)
i hope this will help you,
with regards
venkatramasamy SN
If your need s about alternatively set focus to the option buttons,
then the tabindex propery mightnot complete your obligation
you can acheive it by using arrow keys(any one in four arrow keys...),
place the option buttons in a frame
now use arrow key to change selection(single key-no need to use different keys to move the selection)
i hope this will help you,
with regards
venkatramasamy SN
actually Shouvik and venkatramasamy was given the solution but if you want to try other way you can use enter keys.
may help.
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
Private Sub Option1_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Option2.SetFocus End If End Sub
may help.
![]() |
Similar Threads
- Hardware Interrupts & 100% CPU usage (Windows NT / 2000 / XP)
- "Active" files and moving/changing paths (C++)
- URGENT!! - Constructive Criticism needed on www.giftday.co.za (Website Reviews)
- wxpython Setfocus problem (Python)
- I lack focus... (Java)
- Please review my Gothic Webby (Website Reviews)
- Many Many Many Popups (Viruses, Spyware and other Nasties)
- Set Accessibility Features for People Who are Blind or Who Have Low Vision in WinXP (Windows tips 'n' tweaks)
- window loses focus on CR (Web Browsers)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: Running Hide Rows In Background
- Next Thread: How to select a particular row in MS Hierarchical Flexgrid control ?
| Thread Tools | Search this Thread |
Tag cloud for Visual Basic 4 / 5 / 6
* 6 429 2007 access activex add age append application basic beginner birth bmp calculator cd cells.find click client code college column component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report retrieve save search sendbyte sites sort sql sql2008 sqlserver subroutine table tags textbox time timer urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows






