If you have VS, don't do command compilation. I never came across a situation where VS recommended old syntax. If you need to create a fully managed assembly, choose Class Library project type. Use new syntax and compile using /clr:safe.
if you need to communicate with native libraries, compile with /clr switch which will produce mixed assemblies. Since you have VS IDE, best option is to use it to compile rather than doing through command. VS does things like manifest embedding automatically.
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.