Lectures 16 - Assignment 6 Multiple Forms

Lectures 16 - Assignment 6 Multiple Forms - March 10...

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
Click to edit Master subtitle style 3/17/10 March 10 Lecture: Multiple Forms, Container Controls, This presentation is based on the Forms and ContainerControls VB Projects
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
3/17/10 Using Multiple Forms Extremely powerful and complex programs can be written using just one form. However, in many cases additional forms will be useful in providing the functionality you need for a successful program. Many programs, like photo-editing applications (and Visual Studio) use lots of subordinate windows:
Background image of page 2
3/17/10 Each Form is a Class A Form is a Class, and as such each form in your program can be considered as a sub-program. Each form has its own user interface, both with the user and with other forms. Each form has its own code. As a Class, you can add properties, constructors, and all of the other
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
3/17/10 Adding a Form From the Project menu, select Add Windows Form. In the dialog box which appears, give the form a descriptive name, like “frmDisplay.vb”, and click the Add button. Your new form will appear in the Solution Explorer window and in the form designer window. You can now set its properties and add controls to
Background image of page 4
3/17/10 Startup Form Once you have more than one form in a project, you can choose which one is displayed when the program starts.
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
3/17/10 Opening a Form at Runtime VB allows two ways to open a form. You can open the default instance of the form. If your form is called Form1, you open the default instance with this line of code: Form1.Show() For simple programs, this is good enough. However, if you want to
Background image of page 6
3/17/10 The Form is an Object Once you’ve designed Form1, you can declare variables of that type. Because it is a Class, and not a
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/17/2010 for the course IOE 373 taught by Professor Bobgoodsell during the Winter '10 term at University of Michigan-Dearborn.

Page1 / 30

Lectures 16 - Assignment 6 Multiple Forms - March 10...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online