O'Reilly logo

Special Edition Using Microsoft® Visual Basic® .NET by Jeff Spotts, Brian Siler

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Displaying a New Child Form

The next bit of coding we need to deal with involves creating and displaying a new instance of frmChild, the child form. The user might reasonably expect that when the program is first executed, it opens with a blank document window displayed (as Excel does, for example). In addition, there will be a New command on the File menu to allow the user to open new document windows as needed. Because this functionality (opening and displaying a new document window) needs to be invoked from more than one place in the program, it makes sense to code it as a custom procedure.

Creating the NewChild Procedure

We will name the custom procedure NewChild, and it is to be coded as a part of the frmParent class. To create the NewChild ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required