It doesn't work.
If I guess,
I'd say myself that the error is in the starting of the form.h
What if the variables are always reset to 0?
What if the form, would be... in a repeatative process?
So where should I put the variable Tsn11 ?
It should be managed assemblies. You can pack windows forms in to assemblies(DLLs) which can be used with multiple applications. Create a Class Library project and add reference to System.Windows.Forms assembly.
How to divide a class into multi-files(like c# partial)?
C++ or C++/CLI already supports this. One header file and several source files is possible. You can have a MainFormUI.cpp which includes MainForm.h and have methods like InitializeComponent. Another source file say MainForm.cpp which has all other method implementations.
Unfortunately, VS designer won't support this kind of separation and it will always write the auto-generated code to MainForm.h.
It depends on the point of view, just having multiple physical files or having both multiple physical files and the method of class construction. Yes, you can use multiple files (header/source) in C++ as you do in C#. However, the C# partial class is constructed more like a C++ class-namespace hybrid where you can define methods and data members in multiple source files that somehow come together in the scope of one class.
"We make a living by what we get, we make a life by what we give." --Winston Churchill