Processing various permissions in Visual Studio 2008 for .NET CF

I am developing a graphical application based on .NET CF, my project includes many graphic images. We decided to transfer the application to different resolutions of the mobile phone (240 X 240, 480 X 640), etc.

How can I do this in a single solution / project?

Do I need to create different projects based on permissions? How can I handle shared files? and I need changes in one of the common classes to occur on all devices.

Thanks, Kronos

+5
source share
5 answers

MusiGenesis. Windows Mobile - , CF .

, 240x320. (, 240x240), 240x320:

public partial class frmDialog240x240: frmDialog

:

public partial class frmDialog240x240: Form

. ( ). , , , ( ).

, , , ( factory). , .

, .

+6

Anchoring and Docking - ( , , ). , , , Screen:

int screenWidth = Screen.PrimaryScreen.Bounds.Width;
int workingHeight = Screen.PrimaryScreen.WorkingArea.Height;
+5

:

[DllImport("coredll.dll", EntryPoint = ("GetSystemMetrics"))]
public static extern int GetSystemMetrics(int nIndex);

private const int SM_CXSCREEN = 0;
private const int SM_CYSCREEN = 1;

private int width = GetSystemMetrics(SM_CXSCREEN);
private int height = GetSystemMetrics(SM_CYSCREEN);

, . .

. , . Windows Forms, Dll .

Windows Forms. . / , DLL-, , . Windows Forms, .

+2

. Windows, 600 x 800. CF 240 x 240 ( ) 640 x 480 ( ). .

, . , , , .

. , , , " ", , .

. , , , , . , .

. , , , .

+2

, . , . , , .

"", , . , , , . :

  • OK ?
  • OK ?
  • OK ?
  • OK VGA (640x480) ( DPI)?

VGA- DPI ( ) -:

CurrentAutoScaleDimensions.Height/96

... . ( - 96 DPI)

As a last resort, you can use conditional (if) operators in your regenerated code to test various screen sizes / shapes.

You can still use the constructor for the basic layout, but you will need to run the forms on different emulators / devices and try switching the portrait / landscape to fully test the "regeneration" methods.

0
source

All Articles