You are on page 1of 4

MDI Form

 Open a new project


 Add an mdi form to the project
 Create menu as shown in the screen shot
 Add three forms to the project
 For all three forms make MDICHILD property true
 Type the following code for the MDI form

Private Sub mnuhcild1_Click()


Form1.Show
End Sub
Private Sub mnuchild2_Click()
Form2.Show
End Sub
Private Sub mnuchild3_Click()
Form3.Show
End Sub
Private Sub mnuend_Click()
Unload Me
End Sub

Form1 Coding
Controls : label1 , command button 1

Private Sub Command1_Click()


Label1.Caption = "welcome to India"
End Sub

Form 2 Coding
Controls: one command button
Dim n As Integer
Dim f As Integer
Private Sub Command1_Click()
f=1
n = InputBox("enter n value")
While n > 0
f=f*n
n=n-1
Wend
Print (f)
End Sub

Form 3 Coding
Control: one image control
Load the picture property for the image any one picture

You might also like