Resolution in VB.NET

C

ClearConcepts

Friends,

Currently i am working on VB.NET 2005 desktop application. We are developing
applications in 1024 * 768 resolution. Once we change the resolution say to
800 * 600 desktop application will get enlarged and will be displayed in a
totaly different manner what we designed. So what are techniques(thru code)
that may be followed on each form so that applications' display wouldn't b
get affected when screen resolutions are changed
 
M

Michel Posseth [MCP]

No not through code ,, but with the visual designer

you should use tables and pannels and use the apropriate anchoring
property`s to keep your controls in place


regards

Michel Posseth [MCP]
 
H

Herfried K. Wagner [MVP]

ClearConcepts said:
Currently i am working on VB.NET 2005 desktop application. We are
developing
applications in 1024 * 768 resolution. Once we change the resolution say
to
800 * 600 desktop application will get enlarged and will be displayed in a
totaly different manner what we designed. So what are techniques(thru
code)
that may be followed on each form so that applications' display wouldn't b
get affected when screen resolutions are changed

Each control has 'Dock' and 'Anchor' properties. In addition you can use
TableLayoutPanel and FlowLayoutPanel controls in .NET 2.0.
 
A

Ahmed

We are facing this problem at work. But as a solution, we design the
GUI in 800 X 600. and we limit the max size for the fram to 1024 X 768.
We also use docing and anchoring.
 
G

Guest

In the old VB6 days :)

we ( the company i worked for ) had a routine that could resize the controls
dynamicly , however if the resolution became to big the text did not fit on
the controls .....

i have never seen an equivalant function for VB.Net



Ahmed said:
We are facing this problem at work. But as a solution, we design the
GUI in 800 X 600. and we limit the max size for the fram to 1024 X 768.
We also use docing and anchoring.
 
A

Ahmed

That's anchoring in .NET. You don't need to write any routine. It's in
the framework. But, if the resolution gets so big. the GUI will look
really ugly because of either alot of empy area or over striched
controls. Our idea behind developing in 800X600 is when people use this
resolution they dont get scroll bars

Ahmed
M. Posseth said:
In the old VB6 days :)

we ( the company i worked for ) had a routine that could resize the controls
dynamicly , however if the resolution became to big the text did not fit on
the controls .....

i have never seen an equivalant function for VB.Net
 
G

Guest

Hello Ahmed ,,,

I know that (see my previous posts in this thread )

i was responding to the fact that the TS was asking for a solution in code
well as i said these code solutions exist in VB6 and by my knowledge there
is not a code solution in .Net

The advantage of the code solution was that it looped through the controls
collection and changed the location and size of the controls dynamicly
according to the screen`s resolution


regards

Michel Posseth [MCP]
 
K

Kevin S Gallagher

As Herfried suggested, these methods need to be explored and most likely
will save you a good deal of time down the road. Many developers have no
idea the flexibility which are provied using these properties and controls
yet within the IDE help there are full examples for you to test.
 
G

Guest

It's kind of a crude way of doing it but when I want an application to run on
different screen resolutions, I write a general routine that accepts a form
then loops thru all the controls resizing them and resetting their locations
dependent on the ratio between the designed resolution and the current screen
resolution. I also keep a set of fonts that I apply to each control in this
routine. I then call the routine in the load event of each form.

Note that you have to customize this routine for each application, i.e,
docked controls don't need resizing, etc.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top