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 Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

frame as control container 1

Status
Not open for further replies.

Ravala

Programmer
Jan 28, 2004
88
US
I can call any control on form as Me.ctl.
How can I find out the same thing about frame.
I have Frames as control array (Me.Frame(i))
On every frame I have txtlabelName as control array.
Let's say every frame(0) has 4 elements of txtlabelName indexing from 0 to 3, frame(1) has 4 elements of txtlabelName from 4 to 7, and so on.
How can I new in run time that frame(i) has control
txtlabelName(i)?

Thanks.
 
dim ctl as control

For each ctl in Form1'(or the name of your Form)
if Typeof ctl is Frame then
'Do your checks here
end if
next
 
How do I know that a control placed exact at this frame?
 
Use the Container property.

For each ctl in Form1'(or the name of your Form)
Dim con as Control
con = Nothing
on error resume next
' not all controls have a container property
con = ctl.Cotainer
On error goto 0
if con Is Me.Frame(I) then
'BLAH
End if
next

Forms/Controls Resizing/Tabbing
Compare Code
Generate Sort Class in VB
Check To MS)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top