[dba-VS] Visual Basic 2012 - Change Form & Controls Based On Screen Resolution

Paul Hartland paul.hartland at googlemail.com
Fri Apr 3 04:16:01 CDT 2015


They don't have smaller screens, but very limited screen resolution....i.e.
I have been developing with a screen resolution of 1280x1024.....which is
common on most machines in our head office, however the branches maximum
resolution in their display settings are 1280x800 so the bottoms of the
forms are sometimes off the screen....now I could quickly redevelop in
1280x800 but I just have the feeling that all branches will not be the
same, so I wanted to put some auto code in the application to look at the
current screen resolution and resize all forms and controls.


On 3 April 2015 at 08:16, Gustav Brock <gustav at cactus.dk> wrote:

>  ​Hi Paul
>  If this is a winform application, you should have properties Size.Height
> and Size.Height for most controls in the properties' pane.
> If you mean the code, it is in the FormName.Designer module in the region:
>      Windows Form Designer generated code.
>  like:
>      button1.Size = new System.Drawing.Size(75, 23)
>  But does the client really have smaller screens than all of yours
> laptops?
>  /gustav
>  ------------------------------
> *Fra:* dba-VS <dba-vs-bounces at databaseadvisors.com> på vegne af Paul
> Hartland <paul.hartland at googlemail.com>
> *Sendt:* 3. april 2015 04:52
> *Til:* dba-vs at databaseadvisors.com
> *Emne:* [dba-VS] Visual Basic 2012 - Change Form & Controls Based On
> Screen Resolution
>  To all,
>  Been working on project for a few weeks now, all presentations from my
> laptop and on other in-house laptops worked fine, however went to branch
> yesterday for a demo and forms are too big for the maximum screen
> resolution they have...Now I think I am going blind, I can see some code
> for changing the form size, but not all the controls etc....Can anyone
> point me in the right direction please.
>  Thank you in advance for any help on this.
>  --
> Paul Hartland
> paul.hartland at googlemail.com
> _______________________________________________
> dba-VS mailing list
> dba-VS at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vs
> http://www.databaseadvisors.com

Paul Hartland
paul.hartland at googlemail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://databaseadvisors.com/pipermail/dba-vs/attachments/20150403/222f782c/attachment.html>

More information about the dba-VS mailing list