Example of Sharing a Form Between Projects in VB for WindowsLast reviewed: June 21, 1995Article ID: Q81222 |
The information in this article applies to:
- Standard and Professional Editions of Microsoft Visual Basic for Windows, versions 2.0 and 3.0- Microsoft Visual Basic programming system for Windows, version 1.0
SUMMARYMicrosoft Visual Basic for Windows allows you to share forms between projects. When you make a change to a shared form in one project, that change will be automatically updated in the other projects that share the form. A workaround is also available if you want to change a shared form but do not want to update the form in other projects. Further below is an example of how to use this shared form feature in Visual Basic for Windows, and an example of how to change a shared form without updating it in shared projects.
MORE INFORMATIONBelow are two examples: the first shows how to update shared forms, and the second demonstrates how to change a shared form without having those changes affect the same form in other projects.
Example 11. Run Visual Basic for Windows, or from the File menu, choose NewProject (press ALT, F, N) if Visual Basic for Windows is already running. Form1 is created by default. Notice that the form has been updated to include picture boxes and the command buttons were deleted.
Example 2The following steps are very similar to the example above but with a change in step 5. This example demonstrates how to share forms between projects, but with the forms being designed differently.
|
Additional reference words: 1.00 2.00 3.00
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |