|
-
May 12th, 2002, 02:55 AM
#1
Thread Starter
Not NoteMe
Looping through controls & forms
When i loop through all the controls on a form using a for each loop, is the order consistant, providing the number of controls are constant?
Also, how would i loop through all forms in a program (may or may not be MDIChild/MDI forms?
It goes without saying that i'm thankfull for any replies, but to reitterate, i'm thankfull for any replies
Quotes:
"I am getting better then you guys.." NoteMe, on his leet english skills.
"And I am going to meat her again later on tonight." NoteMe
"I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
"my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
Have I helped you? Please Rate my posts. 
-
May 12th, 2002, 03:10 AM
#2
PowerPoster
To loop through all the forms:
VB Code:
For Each frm in Forms
'Do whatever you want with this form (frm)
Next
-
May 12th, 2002, 03:14 AM
#3
-= B u g S l a y e r =-
SLH, my guess is that the order is consistant, I tried find something in the MSDN regarding the subject, but was not able to 
why do u need to know ?
-
May 12th, 2002, 03:46 AM
#4
Thread Starter
Not NoteMe
Originally posted by peet
why do u need to know ?
I've made a custom tooltip, where it fades in. The speed at which it fades in, depends on how much the user needs the info (from the tooltip). I need to beable to store the speed for each control that has a tooltip.
Quotes:
"I am getting better then you guys.." NoteMe, on his leet english skills.
"And I am going to meat her again later on tonight." NoteMe
"I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
"my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
Have I helped you? Please Rate my posts. 
-
May 12th, 2002, 03:48 AM
#5
Hyperactive Member
give this a try I don't know if it will work with MDI or not you will have to give it a try
VB Code:
Public Sub SetFormColors()
On Error GoTo error
Dim Frm As Form
Dim Ctl As Control
For Each Frm In Forms
Frm.BackColor = vbRed
For Each Ctl In Frm.Controls
Ctl.BackColor = vbRed
Next Ctl
Frm.Show
Next Frm
Exit Sub
error:
Err.Clear
Resume Next
End Sub
-
May 12th, 2002, 03:50 AM
#6
Thread Starter
Not NoteMe
Quotes:
"I am getting better then you guys.." NoteMe, on his leet english skills.
"And I am going to meat her again later on tonight." NoteMe
"I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
"my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
Have I helped you? Please Rate my posts. 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|