|
-
Aug 3rd, 2005, 12:52 AM
#1
Thread Starter
Addicted Member
{Loop through controls of a control array}-URGENT
hi..
i have a winsock control array with index's say 0,1,4,6,etc...
i want to knw how to loop through all the control arrays of dat control...
pls help!
Got You! - ©
- My Signature.
Visit www.compzone.hhnf.com. If you think i helped you, add to my reputation by Clicking "Rate This Post".

-
Aug 3rd, 2005, 02:01 AM
#2
Re: {Loop through controls of a control array}-URGENT
 Originally Posted by prophecy
hi..
i have a winsock control array with index's say 0,1,4,6,etc...
i want to knw how to loop through all the control arrays of dat control...
pls help!
Are the indexes in sequence? I.O.W. Sequentially from 0 to 6?
If that is the case you could use a For loop
VB Code:
Dim I As Integer
For I = 0 To 6
'do whatever
Next I
VB.NET MVP 2008 - Present
-
Aug 3rd, 2005, 03:42 AM
#3
Re: {Loop through controls of a control array}-URGENT
You can do it like this.
VB Code:
Private Sub Command1_Click()
For Each cont In Controls
If cont.Name = "WinsockX" Then '<-- Replace with your control name
''whatever you want to do
MsgBox cont.Name & cont.Index
End If
Next
End Sub
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
|