[Visual Basic] Re: Joining Forms
a.hopkins at bcc.vic.edu.au
a.hopkins at bcc.vic.edu.au
Fri Feb 17 12:26:24 EST 2006
Attached should be a zip file with two projects that show the creation of
multiple forms and passing data between them.
One project creates the forms in code, without using the Windows Form designer;
this is the method I prefer as it gives greater control over what we're doing.
The other 'translates' the code solution into a project using forms designed
with the windows form designer.
Data is passed between the two forms in three ways:
1) Using a variable (in this case a string) declared as Friend in a module. The
Friend keyword means that the scope of an object extends project-wide. (Public
allows access even from outside the assembly.)
2) Using a class as a container for a 'message'
3) Declaring a control on a form as Friend, so that it can be accessed outside
the class that creates that form.
I've written some internal documentation for the code solution to expand on this
a little.
Alex Hopkins
Bayside Christian College
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MultiForms.zip
Type: application/x-zip-compressed
Size: 63154 bytes
Desc: not available
Url : http://www.edulists.com.au/pipermail/vbasic/attachments/20060217/e0c2b832/MultiForms-0001.bin
More information about the vbasic
mailing list