How to Create Access Like Subforms vb2005 express

  • Thread starter Thread starter Edwin Martinez
  • Start date Start date
E

Edwin Martinez

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
 
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

Well, you could use the WPF Expander control....
 
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
 
I still dont get it

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
 
Yes what I am trying to do its to simulate the embedded subforms that are
available in Access.
 
Yes what I am trying to do its to simulate the embedded subforms that are
available in Access.

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
 
Back
Top