How do I rotate focus among controls inside a groupbox/panel?

I have 10 controls in my form. Once the focus reaches control5 (using
my TAB key), I would like the focus to go to control1.

Thanks in advance

Re: Rotate Focus by Herfried

Herfried
Wed Jan 04 11:59:46 CST 2006

<RaginTiger@gmail.com> schrieb:
> How do I rotate focus among controls inside a groupbox/panel?

'Control.ActiveControl' + 'Control.SelectNextControl'.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Re: Rotate Focus by Stoitcho

Stoitcho
Wed Jan 04 12:11:31 CST 2006

Normally the focus move from control to control based on their tab order
(see TabIndex and TabStop) proeprties. By setting them correctly you can get
the desired effect without writing a code.


--

Stoitcho Goutsev (100)

<RaginTiger@gmail.com> wrote in message
news:1136395737.012034.181220@f14g2000cwb.googlegroups.com...
> How do I rotate focus among controls inside a groupbox/panel?
>
> I have 10 controls in my form. Once the focus reaches control5 (using
> my TAB key), I would like the focus to go to control1.
>
> Thanks in advance
>



Re: Rotate Focus by RT

RT
Wed Jan 04 13:44:29 CST 2006


Me.Control5.Parent.SelectNextControl(Me.Control5, True, True, True,
True) in the Leave event sub worked like a charm.

Thanks Mr Wagner!