Hi

How can I develop a screen resolution independent winform app in vb.net? Do
I need a third party tool to achieve this?

Thanks

Regards

Re: Screen resolution independent app by Michael

Michael
Tue Dec 04 16:30:39 PST 2007

"John" <John@nospam.infovis.co.uk> wrote in message
news:%230Zv6vqNIHA.820@TK2MSFTNGP06.phx.gbl...
> Hi
>
> How can I develop a screen resolution independent winform app in vb.net?
> Do I need a third party tool to achieve this?

NO!! Just write code to move controls around as the main form size change.
You can either use the layoutchange event or the resize event. There are
also options built into dot net to do some of it automatically (Dock and
Anchor properties) but it's not always possible to achieve a perfect result
with them. There are third party controls available but imo they are a waste
of time because doing it yourself is so easy. One thing I would suggest is
if you have multiple controls that you need to move around the form as a
group then place them on a panel.

Michael



Re: Screen resolution independent app by Herfried

Herfried
Tue Dec 04 14:23:22 PST 2007

"John" <John@nospam.infovis.co.uk> schrieb:
> How can I develop a screen resolution independent winform app in vb.net?
> Do I need a third party tool to achieve this?

What features do you want to be provided? In other words, what's your
definition of a "screen resolution independent" Windows Forms application?

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>


Re: Screen resolution independent app by John

John
Wed Dec 05 00:38:55 PST 2007

I want the app to fit on screen in both 800x600 and 1024x768.

Thanks

Regards

"Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
news:%23aclimwNIHA.4752@TK2MSFTNGP05.phx.gbl...
> "John" <John@nospam.infovis.co.uk> schrieb:
>> How can I develop a screen resolution independent winform app in vb.net?
>> Do I need a third party tool to achieve this?
>
> What features do you want to be provided? In other words, what's your
> definition of a "screen resolution independent" Windows Forms application?
>
> --
> M S Herfried K. Wagner
> M V P <URL:http://dotnet.mvps.org/>
> V B <URL:http://dotnet.mvps.org/dotnet/faqs/>



Re: Screen resolution independent app by Phill

Phill
Wed Dec 05 05:34:47 PST 2007

John wrote:

> How can I develop a screen resolution independent winform app in vb.net?

(1) Handle the Form's Layout event and put control-positioning code
therein.
Remember that each "container" control gets its /own/ Layout event; the
Form doesn't have to do it all, any more.

or

(2) Override the OnLayout method and do the same thing.
This is a better alternative if you're creating a "base" Form from which
you intend to inherit /other/ forms. If you go this way, remember to
MyBase.OnLayout() at the end of your routine.

or

(3) Use the Anchor and Dock properties on each Control to get them to
move and resize themselves as the user resizes the window.

Personally, I favour either of the first two, because I've had problems
where VB "forgets" about all the stuff I've set up with properties
(especially when working with inherited Forms).

/Always/ "build small, allow for more".

Design at 800x600 (or whatever /minimum/ resolution you intend to
support) but allow the form to resize to use anything larger.

HTH,
Phill W.

Re: Screen resolution independent app by waqaszahoor

waqaszahoor
Wed Dec 05 06:50:49 PST 2007

You also can use TableLayoutPanel control and use dock property of other
control..

"John" <John@nospam.infovis.co.uk> wrote in message
news:#0Zv6vqNIHA.820@TK2MSFTNGP06.phx.gbl...
> Hi
>
> How can I develop a screen resolution independent winform app in vb.net?
> Do I need a third party tool to achieve this?
>
> Thanks
>
> Regards
>

Re: Screen resolution independent app by Herfried

Herfried
Wed Dec 05 11:20:22 PST 2007

"John" <John@nospam.infovis.co.uk> schrieb:
>I want the app to fit on screen in both 800x600 and 1024x768.

Well, that's supported out of the box. Simply set the form's 'WindowState'
property to 'Maximized' and use docking, anchoring and the tablelayoutpanel
and flowlayoutpanel controls.

Note that increasing the size of the controls does not make much sense
because it will make using the application harder if controls get very large
or small.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>