Article View: comp.lang.basic.visual
Article #198Dynamic UserControl Properties?
From: Perry Bales
Date: Thu, 25 Dec 1997 00:00
Date: Thu, 25 Dec 1997 00:00
36 lines
2749 bytes
2749 bytes
I'm working on a TitleBar UserControl, so I can add more buttons to the
titlebar. I'm using pictureboxes for the buttons, then the
"picExtraButton(index).Line" method in the control to draw the 3d highlights
myself.
I have the first ExtraButton already created but not visible. with the
picturebox's "Index" set to 0 so as to create the ExtraButton array.
When the control is added to a form it first recreates Windows' standard
titlebar by checking the relevant system metrics then allows the designer to
add more buttons to this titlebar.
Each new button that the designer using this control adds to the control
will have several properties. Available properties for each button would be
something like:
.Visible
.Image
.Caption
etc.
I know how to get the control to save these properties for 1 button using:
PropertyChanged "objectproperty" in the Let/Set property fuction.
then the contol writes the new value to propbag.
Creating more pictureboxes is easy too, but how do I get the control to
dynamically create an array of these ExtraButton properties in propbag so it
can save
the properties for buttons added later by the designer just as it does for
the first one. Or Do I just have create my own data file and access it
through the userdefined Let/Get property functions that I created for each
property.
Also after hideing Window's original TitleBar there's another little
problem of getting an icon to appear in the TaskBar Button. Any idea's for a
solution to this would also be appreciated.
Please reply by email as well as newsgroup posting. Thank you
Perry
Technical Details
Message-ID:
<67vm4o$s73@pegasus.starlink.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10f676,358314393dddab26,start X-Google-Attributes: gid10f676,public X-Google-Thread: 104093,358314393dddab26,start X-Google-Attributes: gid104093,public X-Google-Thread: 113d8f,358314393dddab26,start X-Google-Attributes: gid113d8f,public X-Google-Thread: 110e3b,358314393dddab26,start X-Google-Attributes: gid110e3b,public X-Google-Thread: 10b213,358314393dddab26,start X-Google-Attributes: gid10b213,public X-Google-Thread: f645d,358314393dddab26,start X-Google-Attributes: gidf645d,public X-Google-Thread: 108062,358314393dddab26,start X-Google-Attributes: gid108062,public From: "Perry Bales" <peb@starlink.com> Subject: Dynamic UserControl Properties? Date: 1997/12/25 Message-ID: <67vm4o$s73@pegasus.starlink.com> X-Deja-AN: 310242236 X-MimeOLE: Produced By Microsoft MimeOLE V4.71.1712.3 Organization: Star Link Internet Services Newsgroups: comp.lang.basic.visual,comp.lang.basic.visual.misc,cz.comp.lang.basic.visual,microsoft.public.vb.controls,microsoft.public.vb.controls.creation,microsoft.public.vb.enterprise,microsoft.public.vb.winapi