Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

eVB

Status
Not open for further replies.

Niv3k

Programmer
Jul 11, 2001
350
US
Does anyone know a way to iterate through the textboxes on a form using a For...Each statement or something? eVB is different than VB, its the one for Windows CE...

Kevin
 
I haven't used eVB so I'm not sure what objects it supports. If like VB it uses a Form object with a Controls collection as its property then you would use something like this:

Dim objControl As Control

For Each objControl in Me.Controls
If objControl Is TextBox then
'Do what you want to do
End if
Next

This is the VB approach but hope it helps!
 
Negative, ghostwriter. I tried that, frmMain.Controls, etc... A lot of VB doesn't work the same in eVB. For example, you can only use the "Left(string, length)" inside a code module, not a form.

Thanks though. I gave up and did txt1.backcolor=0, txt2.backcolor=0, etc...

Kevin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top