Slieds - Chapter 8

Slieds - Chapter 8 - Chapter8 MultipleFormsandModules 1...

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

View Full Document Right Arrow Icon
Chapter 8 Multiple Forms and Modules BMGT 302 Business Application  Programming 1
Background image of page 1

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

View Full DocumentRight Arrow Icon
Windows Forms Applications Windows Forms applications are not limited to  only a single form You may create multiple forms To use as dialog boxes Display error messages And so on Windows Forms applications typically have one  form called the  startup form Automatically displayed when the application starts Assigned to the first form by default Can be assigned to any form in the project 2
Background image of page 2
Form Files and Form Names Each form has a  Name  property Set to  Form1  by default Each form also has a file name Stores the code associated with the form  Has the same name as the form  Followed by the  .vb  extension Shown in the  Solution Explorer  window 3
Background image of page 3

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

View Full DocumentRight Arrow Icon
Renaming an Existing Form File Always use the  Solution  Explorer   window to  change the file name and  the form’s  Name  property  will change automatically To rename a form file: Right-click  file name  in  Solution Explorer  Select  Rename  from  the menu Type the new name for  the form Be sure to keep the  . vb  extension   Remember to  give each  form  a meaningful  name 4
Background image of page 4
Adding a New Form to a Project To add a new form to a project: Click  Project  on the Visual Studio menu bar, and then  select  Add Windows Form . . .  The  Add New Item   window appears Enter the new Name           in the  Name  text box Click the  Add  button A new blank form is       added to your project 5
Background image of page 5

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

View Full DocumentRight Arrow Icon
Switching between Forms and  Form Code To switch to another form: Double-click  the form’s  entry in the  Solution  Explorer  window To switch between forms or  code: Use the tabs along the top  of the  Designer  window Switching only works at design time 6
Background image of page 6
Removing a Form To remove a form from a  project and delete its file from  the disk: Right-click  the form’s  entry in the  Solution  Explorer  window On the pop-up menu, click  Delete To remove a form from a  project but leave its file on  disk*: Right-click  the form’s  entry in the  Solution  Explorer  window   *Not available in Visual Basic Express 7
Background image of page 7

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

View Full DocumentRight Arrow Icon
Designating the Startup Form To make another form the  startup form: Right-click  the project  name in the  Solution  Explorer  window On the pop-up menu,  click  Properties , the  properties page   appears Select the  Application   tab Click the  down arrow   in the  Startup Form  drop-down list   8
Background image of page 8
Creating an Instance of a Form The form design is a   class It’s only a design or  description of a form
Background image of page 9

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

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

This note was uploaded on 11/21/2011 for the course BMGT 302 taught by Professor Huang during the Fall '11 term at Maryland.

Page1 / 35

Slieds - Chapter 8 - Chapter8 MultipleFormsandModules 1...

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

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