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 ...
Get Special Edition Using Microsoft® Visual Basic® .NET now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.