0
votes

some one in tips and tricks say like this plz i cant understand that plz if u could provide saple code for that answer ,i could understand it.actullay iam facing this problem in my application where iam using C#.net,VS 2008,windows mobile 6 professional.

they told like this below one

If you have to support multiple screen sizes/resolutions, form inheritance is an excellent way to do it. Basically you design your form to fit the standard 320x240 screen. To support a different screen size, you just add a new form, inherit from your custom form (instead of just Form), and then re-arrange the controls as necessary.

1

1 Answers

0
votes
class BaseForm
{
    protected Label label1;
    protected Label label2;

    BaseForm()
    {
        InitializeComponent();
        DoLayout();
    }

    protected virtual void DoLayout() { }
    // etc.
}

class Form240_320 : BaseForm
{
    protected override void  DoLayout()
    {
        // re-position controls for 320x240
        // etc.
    }

}

class Form320_240 : BaseForm
{
    protected override void  DoLayout()
    {
        // re-position controls for 320x240
        // etc.
    }
}