[quoted text, click to view] On Oct 10, 7:04 am, "Edwin Martinez" <edwin.marti...@gmail.com> wrote:
> Yes what I am trying to do its to simulate the embedded subforms that are
> available in Access.
>
> "rowe_newsgroups" <rowe_em...@yahoo.com> wrote in message
>
> news:1192012205.235071.175700@r29g2000hsg.googlegroups.com...
>
> > On Oct 9, 9:45 pm, "Edwin Martinez" <edwin.marti...@gmail.com> wrote:
> >> I still dont get it
>
> >> "rowe_newsgroups" <rowe_em...@yahoo.com> wrote in message
>
> >>news:1191934884.307617.212030@19g2000hsx.googlegroups.com...
>
> >> > On Oct 8, 10:43 pm, "Edwin Martinez" <edwin.marti...@gmail.com> wrote:
> >> >> Hello I have a parent form but I want to create 4 forms that will be
> >> >> shown
> >> >> in a area inside the parent form when I click to buttons.
>
> >> >> +----------------------------+
> >> >> | Parent Form |
> >> >> | |
> >> >> | -------------------- |
> >> >> | | subform | |
> >> >> | | | |
> >> >> | | | |
> >> >> | -------------------- |
> >> >> +----------------------------+
>
> >> >> Visual Basic 2005 Express
>
> >> >> Thanks,
>
> >> >> Edwin
>
> >> > Look up UserControls.
>
> >> > Thanks,
>
> >> > Seth Rowe
>
> > Maybe I've misunderstood you. Are you trying to simulate the embedded
> > subforms that are available in Access, or are you simply trying to
> > create an MDI application (such as Word, Excel, Access)? There are two
> > very different answers for these two very different scenarios.
>
> > Thanks,
>
> > Seth Rowe
Alright, UserControls are basically used to drop related controls into
a container for encapsulation and reuse. For a simple example, suppose
you had multiple parts of a program (or multiple programs) that
required the use to list the path of a text file. For this you would
need a Label, a TextBox, a Button, and an OpenFileDialog. Instead of
dropping all the parts multiple times into each form, you could put
all of them into a UserControl and code in all the necessary behavior
(such as the Button opening the OpenFileDialog and putting the
filepath in the TextBox). Then you would just need to drop the
UserControl into each form. In essence, UserControls act like mini-
forms. They act the same in the designer and (mostly) at runtime, with
the only major difference being that UserControls are not self
sustaining in that they must be placed in a parent object (such as a
form).
Does that explain UserControls a bit better?
Thanks,
Seth Rowe