MakeItWork
Member
- Joined
- Feb 20, 2021
- Messages
- 6
- Programming Experience
- 1-3
Hi all,
Hopefully this question is not to stupid so here we go.....
With c# window forms the main code starts with
public partial class Form1 : Form
I have been splitting the main code file into separate files that still compile into one with
public partial class Form1
It works but does not appear to like any other visual studio than the one it was set up in and the project file can corrupt easy.
I think it is the cause of other problems like Graphics .invalidate which has never worked. Windows size adjustment of the program being run does not change to the value it is set to. Int16 (short) conversion/use has caused errors with nothing wrong with the code. Picturebox code would not work (no compile errors) until it was moved to another location, nothing wrong with its original location and now graphics code doing the same.
I Googled the problem which gives no end on how to split classes, it is not clear how to split the main form.
How wrong is splitting code up using public partial class Form1 and what is the correct way.
Thanks in advance
Hopefully this question is not to stupid so here we go.....
With c# window forms the main code starts with
public partial class Form1 : Form
I have been splitting the main code file into separate files that still compile into one with
public partial class Form1
It works but does not appear to like any other visual studio than the one it was set up in and the project file can corrupt easy.
I think it is the cause of other problems like Graphics .invalidate which has never worked. Windows size adjustment of the program being run does not change to the value it is set to. Int16 (short) conversion/use has caused errors with nothing wrong with the code. Picturebox code would not work (no compile errors) until it was moved to another location, nothing wrong with its original location and now graphics code doing the same.
I Googled the problem which gives no end on how to split classes, it is not clear how to split the main form.
How wrong is splitting code up using public partial class Form1 and what is the correct way.
Thanks in advance