🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.comp.lang.vba
Article #6

Re: determing which frame a component is placed on

#6
From: Ken Halter
Date: Thu, 07 Aug 2003 14:14
45 lines
3291 bytes
> have no idea where which frame they have been placed on. I can see the
:-) The controls "know" <g>... you can select the name in the property window and check
their Left/Top property to see if they're viewable (compared to the size of the frame)

When you change the name of an element of a control array and decide that it shouldn't be
an array, just click on the Index property and hit backspace (remove the number there).
Once you hit enter, the control will no longer be part of an array. If you've already
added code to the event handlers for that control, you'll need to fix the event
declaration (get rid of the Index param)

At runtime, you can find all controls that are inside any given container control
(frame/picturebox/etc) with the code below. The code allows for nested containers (frame1
inside frame2 etc)

Find Controls in a Container
http://www.vbsight.com/Code.htm


-- 
Ken Halter - MS-MVP-VB - http://www.vbsight.com
Please keep it in the groups..


"michael gois" <mikey@gois.net> wrote in message
news:FzrYa.53239$9C6.3177735@wards.force9.net...
> Hi
> I am building an application which uses several frames, and then frames
> inside frames, but not all appearing at the same time.
> The problem is that i am now finding sometimes controls which i created and
> have no idea where which frame they have been placed on. I can see the
> controls in the properties box, but obviously if i dont have the frame on
> the screen or if there are frames on top of it, i cannot see the control.
> Is there a way to find out what frame a component has been placed on?
>
> Also, on a slightly different note, sometimes I create a control array, but
> then decide its best to just have the controls as individual items.  I
> rename the control to a name that isnt a control array, but it still remains
> an array, and i still have to refer to it as mycontrol(i) as opposed to
> mycontrol. Anyone know how to reset a control to be out of a control array?
>
> Thanks
>
> Michael
>
>
Technical Details
Message-ID: <O1S594OXDHA.656@tk2msftngp13.phx.gbl>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!msrtrans1!TK2MSFTNGP08.phx.gbl!tk2msftngp13.phx.gbl
References: <FzrYa.53239$9C6.3177735@wards.force9.net>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 113d8f,dcd0afba46c1c50c
X-Google-Attributes: gid113d8f,public
X-Google-Thread: 110e3b,dcd0afba46c1c50c
X-Google-Attributes: gid110e3b,public
X-Google-Thread: 10b213,dcd0afba46c1c50c
X-Google-Attributes: gid10b213,public
X-Google-Thread: 109fdd,dcd0afba46c1c50c
X-Google-Attributes: gid109fdd,public
X-Google-Thread: 10b392,dcd0afba46c1c50c
X-Google-Attributes: gid10b392,public
X-Google-ArrivalTime: 2003-08-07 07:15:00 PST
From: "Ken Halter" <Ken_Halter@Use_Sparingly_Hotmail.com>
References: <FzrYa.53239$9C6.3177735@wards.force9.net>
Subject: Re: determing which frame a component is placed on
Date: Thu, 7 Aug 2003 07:14:36 -0700
Lines: 47
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-Mimeole: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <O1S594OXDHA.656@tk2msftngp13.phx.gbl>
Newsgroups: alt.comp.lang.vba,cn.bbs.comp.lang.visual-basic,comp.lang.basic.visual.misc,microsoft.public.vb.controls,microsoft.public.vb.controls.creation
NNTP-Posting-Host: 12.31.176.130
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!msrtrans1!TK2MSFTNGP08.phx.gbl!tk2msftngp13.phx.gbl