PPC 2003 Or Windows CE .NET 4.2 - How to differentiate in run time

  • Thread starter Thread starter Jandro
  • Start date Start date
J

Jandro

I making an aplication that will run on diferents terminals.

I need to Know the terminal's operative system in run time because the
form's desing is diferent from ppc or ce .net

How can I do it???

Thanks

Jandro
 
If you are saying that you want to resize based on the screen size, then
*that's* what you ought to be checking, not the OS version. You can get the
total display area using code like this:

Rectangle r = System.Windows.Forms.Screen.PrimaryScreen.Bounds;

You can get the OS information, if you want that with this code:



System.OperatingSystem os = Environment.OSVersion;



I suspect that there won't be an indication of "PocketPC" in that, though
(certainly there isn't in the emulator). You might look at a registry key:



[HKEY_LOCAL_MACHINE\Platform]
"Name"="<some platform name>"
"Type"=dword:2


You may be able to make something from the Name value.

Paul T.
 
Back
Top