Hi All,

We are trying to develop an application to be run primarily on Windows
Mobile Devices but also on WIN32 based platforms as well.

We are just wondering if there is any way to make our forms that we design
for Windows Mobile devices scale to the screen size of any WIN32 platforms
that the application is run on. At the moment, they display when run on a
WIN32 platform, but the forms only appear at the size they were created (ie.
screen size of a PDA).

I briefly looked at the TableLayoutPanel class, but I couldn't see how to
add that to my project (it doesn't appear on my Toolbox). It may be that it
isn't available for projects with a target device of Windows Mobile or Pocket
PC. Also, I came across a MSDN article that says to use this sparingly for
performance reasons. What alternatives are there? Just handling the forms
resize event and resizing components accordingly?

Any help is appreciated.

Thanks,
Chris

Re: Forms for both Windows Mobile and WIN32 platforms by Daniel

Daniel
Tue Sep 18 07:01:54 PDT 2007

> performance reasons. What alternatives are there? Just handling the forms
> resize event and resizing components accordingly?
Yes, combined with docking and anchoring.

Having said that, I would question the design that mandates to reuse forms
on both platforms (unless maybe if the win32 platform is a small UMPC or
other such smallish touch screen device). Just reuse the business logic and
wrap it with platform-specific GUIs. My £0.02.

http://msdn.microsoft.com/msdnmag/issues/07/07/ShareCode/default.aspx

Cheers
Daniel
--
http://www.danielmoth.com/Blog

"Chris M" <ChrisM@discussions.microsoft.com> wrote in message
news:86DBB8EC-2527-41CB-BF39-95685AFEF327@microsoft.com...
> Hi All,
>
> We are trying to develop an application to be run primarily on Windows
> Mobile Devices but also on WIN32 based platforms as well.
>
> We are just wondering if there is any way to make our forms that we design
> for Windows Mobile devices scale to the screen size of any WIN32 platforms
> that the application is run on. At the moment, they display when run on a
> WIN32 platform, but the forms only appear at the size they were created
> (ie.
> screen size of a PDA).
>
> I briefly looked at the TableLayoutPanel class, but I couldn't see how to
> add that to my project (it doesn't appear on my Toolbox). It may be that
> it
> isn't available for projects with a target device of Windows Mobile or
> Pocket
> PC. Also, I came across a MSDN article that says to use this sparingly for
> performance reasons. What alternatives are there? Just handling the forms
> resize event and resizing components accordingly?
>
> Any help is appreciated.
>
> Thanks,
> Chris


Re: Forms for both Windows Mobile and WIN32 platforms by dbgrick

dbgrick
Tue Sep 18 08:52:03 PDT 2007

I agree with Daniel that this would not be the best possible solution, but
you could use System.Windows.Forms.Screen.PrimaryScreen in your Constructor
of your forms to set the form size. This gives you the Primary Screen
display area excluding task bars and menus.

Good Luck,
Rick D.
Contractor

"Daniel Moth" wrote:

> > performance reasons. What alternatives are there? Just handling the forms
> > resize event and resizing components accordingly?
> Yes, combined with docking and anchoring.
>
> Having said that, I would question the design that mandates to reuse forms
> on both platforms (unless maybe if the win32 platform is a small UMPC or
> other such smallish touch screen device). Just reuse the business logic and
> wrap it with platform-specific GUIs. My £0.02.
>
> http://msdn.microsoft.com/msdnmag/issues/07/07/ShareCode/default.aspx
>
> Cheers
> Daniel
> --
> http://www.danielmoth.com/Blog
>
> "Chris M" <ChrisM@discussions.microsoft.com> wrote in message
> news:86DBB8EC-2527-41CB-BF39-95685AFEF327@microsoft.com...
> > Hi All,
> >
> > We are trying to develop an application to be run primarily on Windows
> > Mobile Devices but also on WIN32 based platforms as well.
> >
> > We are just wondering if there is any way to make our forms that we design
> > for Windows Mobile devices scale to the screen size of any WIN32 platforms
> > that the application is run on. At the moment, they display when run on a
> > WIN32 platform, but the forms only appear at the size they were created
> > (ie.
> > screen size of a PDA).
> >
> > I briefly looked at the TableLayoutPanel class, but I couldn't see how to
> > add that to my project (it doesn't appear on my Toolbox). It may be that
> > it
> > isn't available for projects with a target device of Windows Mobile or
> > Pocket
> > PC. Also, I came across a MSDN article that says to use this sparingly for
> > performance reasons. What alternatives are there? Just handling the forms
> > resize event and resizing components accordingly?
> >
> > Any help is appreciated.
> >
> > Thanks,
> > Chris
>

Re: Forms for both Windows Mobile and WIN32 platforms by ChrisM

ChrisM
Wed Sep 19 20:46:03 PDT 2007

Hi Daniel and Rick,

Thanks for your responses.

Thanks also for pointing me towards your article too Daniel. That looks like
it will be a great resource for our development team. Unfortunately, we are
all new to .NET and C# and are therefore going to have quite a steep learning
curve.

I realise that what I am requesting is not a ideal way to go, but it is
merely something we are looking at to provide functionality on both platforms
with minimal effort upfront. The reason being is that our project has a fixed
deadline, and we have LOADS to do in that time.

Having said that, we are trying to design the app in such a way that we are
totally abstracting the UI from the rest of the business logic code and at a
later stage we could look at writing a different UI for Desktop/Tablet PCs.

I can see I will be using this forum a lot over the next couple of months :)
Please forgive me if I ask seemingly stupid questions...I will get there in
the end.

Thanks again,
Chris

"Daniel Moth" wrote:

> > performance reasons. What alternatives are there? Just handling the forms
> > resize event and resizing components accordingly?
> Yes, combined with docking and anchoring.
>
> Having said that, I would question the design that mandates to reuse forms
> on both platforms (unless maybe if the win32 platform is a small UMPC or
> other such smallish touch screen device). Just reuse the business logic and
> wrap it with platform-specific GUIs. My £0.02.
>
> http://msdn.microsoft.com/msdnmag/issues/07/07/ShareCode/default.aspx
>
> Cheers
> Daniel
> --
> http://www.danielmoth.com/Blog