ABOUT THE USE OF MDI FORM IN VISUAL BASIC 2008

in utopian-io •  7 years ago  (edited)

image.png
source images

In a biasanyater program can be a Master form (MDI Form) and a Child Form (Form Chlid). For example in one Parent Form there are several child forms. First create a project called "learn Form". Then save it in a folder named name your folder or get sucked sesaui your cool. To create a new Project please look at the basic Visual basic 2008 tutorial . When finished create a project follow the steps - steps as below.

A. Stage of Making Master Form (MDI Form)

First Make a Master Form

Click on Project Menu -> Add Windows Form

Then the dialog box will appear as follows:
image.png

Select Windows FormsSelect MDI Parent Form

Select named MDIParent1

Then click Add

The result will be like this.
image.png

B. Stage Making Menu Form Parent (MDI Form)

Click on MDI form

This is the result of the MDI Form
image.png

Select Menu & Toolbars

Select MenuStrip

Drag in MDI form

image.png

Make Menu so it looks like this

For which red square box is used to add the menu

image.png

C. Stage Making a Child Form

Click Project Menu -> Add Windows Form ...

Then the dialog box will appear as follows:

image.png

Select Windows Forms

Choose Windows Form

Name it "frmchid.vb", The result is like the picture below.

image.png

Make 2 more form as above with the name "square area" and "luasegitiga" so it will look like above.

D. Step How to Call a Child Form from a Parent Form

Next select MDI Form, then Double click on the red box in MDI Form.
image.png

Add the following code:

frmchild.MdiParent = Me
frmchild.Show()

Now try running the result will appear Form child in MDI Form.

Likewise for the square shape and the third form

code for square footage

luaspersegi.MdiParent = Me
luaspersegi.Show()

And here is the code for luasegitiga

luassegitiga.MdiParent = Me
luassegitiga.Show()

Up here you can call the child form form.

E. Create a Simple Calculation Form or Program Example

Click on the square shape form and make the following look:

image.png

Here is the picture above.

Screenshot_11.png

NOTE SMALL HESAR WHEN TO MAKE A REPLACE "name"

When finished double click on button "btnhasil" / COPY, Type the following code:

lblhasil.Text = txtsisi1.Text * txtsisi2.Text

Here is a simple program result above.
image.png

For the second program is the area of ​​triangle you try to make your own for learning for the formula can use "1/2 x base height x". that's the tutorial how to make the form mdi or mdi form on vsiual basic 2008 or visual basic 9.



Posted on Utopian.io - Rewarding Open Source Contributors

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Your contribution cannot be approved because it does not refer to or relate to an open-source repository. See here for a definition of "open-source."

You can contact us on Discord.
[utopian-moderator]