Presentation is loading. Please wait.

Presentation is loading. Please wait.

CECS 5020 Computers in Education Forms and Menus.

Similar presentations


Presentation on theme: "CECS 5020 Computers in Education Forms and Menus."— Presentation transcript:

1 CECS 5020 Computers in Education Forms and Menus

2 CECS 5020 Types of Forms u Single Document Interface –One document at a time u Multiple Document Interface –More than one document at a time –“Child” forms on the MDI form are constrained to stay inside the MDI form

3 CECS 5020 Experiment with SDI and MDI Forms u Create two forms, Form1 and Form2, both of which have their “MDI Child” properties set to False u Add a line to Form1’s Load event to show Form2 (“Form2.Show”)

4 CECS 5020 Creating a MDI Form u Add a new MDI form (Project/Add MDI Form) u Set the MDI Child property of Form 2 to “True” u Run the program and see how Form 2 behaves when you resize it and move it outside of the MDI form’s boundaries u Note how Form 1 behaves also

5 CECS 5020 Form Properties u Caption u Icon u Height, Width, Left, Top u Background Color u MouseIcon, MousePointer (99 for custom) u StartUp Position u WindowState

6 CECS 5020 Form Events u Resize –Use this event to re-size child controls or forms u Click u MouseMove u Load u Unload

7 CECS 5020 Code a Form Event u Create a new project with an MDI Form and a child form u Code the MDI Form’s Resize event to resize the child form to 1/2 the size of the MDIForm Private Sub MDIForm_Resize() Form1.Width = MDIForm1.Width / 2 Form1.Height = MDIForm1.Height / 2 End Sub

8 CECS 5020 Menus u Menu Editor –Creates hierarchical menus –Captions that are only - (hyphen) create separator bars –Shortcut keys are created by putting an ampersand before the letter that is the shortcut »&File »E&xit

9 CECS 5020 Creating a Menu for Your Project u Tools/Menu Editor u &File »&New »&Open »E&xit –&Edit –&Help


Download ppt "CECS 5020 Computers in Education Forms and Menus."

Similar presentations


Ads by Google