All About Windows Forms All About Windows MDI Forms Creating Windows Applications Adding Controls to Forms Handling Events A Windows Form in Code Immediate Solutions: Setting Title Bar Text Adding/Removing Min/Max Buttons and Setting a Form's Border Setting Control Tab Order Setting Forms' Initial Positions Moving and Sizing Forms and Controls in Code Showing and Hiding Controls and Forms Using the MsgBox Function Using the MessageBox.Show Method Using the InputBox Function Working with Multiple Forms Using Properties to Communicate between Forms Setting the Startup Form Creating Multiple Document Interface (MDI) Applications Creating Dialog Boxes Creating Owned Forms Passing Forms to Procedures Minimizing/Maximizing and Enabling/Disabling Forms Anchoring and Docking Controls Adding and Removing Controls at Run Time Creating Always-on-Top Forms Using Visual Inheritance between Forms Handling Mouse Events Handling Keyboard Events Sending Keystrokes to Other Programs Beeping
In this chapter, we start to get visual. As you know, there are two types of forms in Visual Basic .NET—Windows forms and Web forms. This chapter is all about working with Windows forms.
There's a great deal to see about Windows forms in Visual Basic; we'll take a look at it here. We'll see how to customize forms; how to work with multiple forms; how to support the Multiple Document Interface (MDI); how to handle MDI child forms; how to use MsgBox, MessageBox, and InputBox to create message boxes and input boxes; how to create, hide, and show forms in code; how to add controls at run time; and much more. We'll begin the chapter with an overview of Visual Basic Windows forms.