Object Reference and Casting
Hi everyone I'm starting on VB.net and have encounter some problems:
1._ I have two Forms (Form1 and Form2), on Form1 I have a public variable; Form1 calls Form2. My problem is that I need to change that public variable from Form2. I have (in Form2) a variable declared as Form1, but I don't know how to make that variable point to the existing instance of Form1.
2._ Is there a legal way to cast from an object to a button. 'Cause I have something like this:
Dim btn as button;
btn=sender '(which is an object);
When I use strict off I can do it fine but I get an error if I turn strict on.
Thanks for the help.