Program4Food
Active member
- Joined
- Nov 22, 2021
- Messages
- 40
- Programming Experience
- 10+
See the code below, I can call this. to minimize the form (form1, the only form in the project), but if I try to call it directly (like I used to be able to do in old VB) by calling it form1., I get an error. I do not understand why I cant call the form directly...
Screen shot showing VS2012 error is attached.
I am self taught so my knowledge and understanding is growing, but is limited. :-( Thank you for your time.
Screen shot showing VS2012 error is attached.
I am self taught so my knowledge and understanding is growing, but is limited. :-( Thank you for your time.
calling a form directly by name does not work:
private void Form1_Load(object sender, EventArgs e)
{
// this.WindowState = System.Windows.Forms.FormWindowState.Minimized;
Form1.WindowState = System.Windows.Forms.FormWindowState.Minimized;
}