Click here to Skip to main content
15,906,766 members
Home / Discussions / C#
   

C#

 
GeneralRe: DLL wrapper and structs Pin
Tym!15-Sep-03 6:48
Tym!15-Sep-03 6:48 
GeneralException from HRESULT: 0x800A01C9 Pin
ajkumar12-Sep-03 14:09
ajkumar12-Sep-03 14:09 
GeneralRe: Exception from HRESULT: 0x800A01C9 Pin
leppie12-Sep-03 14:44
leppie12-Sep-03 14:44 
GeneralRe: Exception from HRESULT: 0x800A01C9 Pin
ajkumar12-Sep-03 15:52
ajkumar12-Sep-03 15:52 
GeneralRe: Exception from HRESULT: 0x800A01C9 Pin
leppie12-Sep-03 16:10
leppie12-Sep-03 16:10 
GeneralRe: Exception from HRESULT: 0x800A01C9 Pin
J. Dunlap12-Sep-03 15:05
J. Dunlap12-Sep-03 15:05 
GeneralRe: Exception from HRESULT: 0x800A01C9 Pin
ajkumar14-Sep-03 6:17
ajkumar14-Sep-03 6:17 
General#dev 0.97 released Pin
leppie12-Sep-03 10:59
leppie12-Sep-03 10:59 
GeneralRe: #dev 0.97 released Pin
J. Dunlap12-Sep-03 13:55
J. Dunlap12-Sep-03 13:55 
GeneralRe: #dev 0.97 released Pin
leppie12-Sep-03 14:41
leppie12-Sep-03 14:41 
GeneralI would like to refine an array. Pin
mcgahanfl12-Sep-03 9:42
mcgahanfl12-Sep-03 9:42 
GeneralRe: I would like to refine an array. Pin
Ernesto Perales Soto12-Sep-03 13:18
Ernesto Perales Soto12-Sep-03 13:18 
GeneralRe: I would like to refine an array. Pin
Nnamdi Onyeyiri13-Sep-03 1:24
Nnamdi Onyeyiri13-Sep-03 1:24 
GeneralVSS Pin
yyf12-Sep-03 8:07
yyf12-Sep-03 8:07 
GeneralRe: VSS Pin
NetPointerIN12-Sep-03 8:25
NetPointerIN12-Sep-03 8:25 
GeneralRe: VSS Pin
leppie12-Sep-03 9:00
leppie12-Sep-03 9:00 
Questionwhat textboxes are on my form? Pin
.gonad12-Sep-03 7:45
.gonad12-Sep-03 7:45 
AnswerRe: what textboxes are on my form? Pin
Mazdak12-Sep-03 7:55
Mazdak12-Sep-03 7:55 
AnswerRe: what textboxes are on my form? Pin
mcgahanfl12-Sep-03 9:48
mcgahanfl12-Sep-03 9:48 
AnswerRe: what textboxes are on my form? [edited] Pin
leppie12-Sep-03 10:31
leppie12-Sep-03 10:31 
AnswerRe: what textboxes are on my form? Pin
David Stone12-Sep-03 10:31
sitebuilderDavid Stone12-Sep-03 10:31 
AnswerRe: what textboxes are on my form? Pin
mcgahanfl12-Sep-03 14:41
mcgahanfl12-Sep-03 14:41 
All of the solutions given to you will work, if you just want textbox controls on the "FORM".

But if your form contains tab-controls or frame-controls and you would like to know what/if these containers also contain textbox controls, then I think you need the solution I gave you.

Lastly, if you do not care about textbox controls nested inside tab pages that are not active you could use GetNextControl().

Here is an example.
public void SetFocusOnFirstEmptyControl()
{
int iCount=0;
System.Windows.Forms.Control Traverse = this;
//System.Reflection
while(Traverse != null)
{
Debug.WriteLine(++iCount + " " + Traverse.Text );
//myChild.GetType().BaseType.Equals(typeof(myFatherClass))

if(Traverse.GetType() == typeof(CheckBox) ||
Traverse.GetType().IsSubclassOf(typeof(CheckBox)))
{//do special case handling for check box
System.Windows.Forms.CheckBox pCheck = (System.Windows.Forms.CheckBox)Traverse;
if(pCheck.Checked== false)
{
Traverse.Focus();
break;
}
}
if(Traverse.Text.Length == 0)
{//test controls like textbox and dropdown
Traverse.Focus();
break;
}
Traverse = GetNextControl(Traverse, true);

}//while


}//SetFocusOnFirstEmptyControl

You have a lot of good people helping you. An answer is assured.

GeneralRe: what textboxes are on my form? Pin
.gonad14-Sep-03 10:35
.gonad14-Sep-03 10:35 
GeneralListBox control and Datasource Pin
KevinS7512-Sep-03 5:11
KevinS7512-Sep-03 5:11 
GeneralSmart User Control Pin
cvandyke12-Sep-03 5:10
cvandyke12-Sep-03 5:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.