473,412 Members | 2,048 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,412 software developers and data experts.

Resolution Resize

Dear all,

In vb6, I'll do it by getting the ratio between the resolution
setting in screen and in design mode. Afterward, adjust each control's
position and size with the ratio according to the control type. Is there any
other way do it in .Net? Thanks

Best Rdgs
Ellis
Nov 21 '05 #1
5 2574
"Ellis Yu" <el******@transfield.com> schrieb:
In vb6, I'll do it by getting the ratio between the resolution
setting in screen and in design mode. Afterward, adjust each control's
position and size with the ratio according to the control type. Is there
any
other way do it in .Net?


Take a look at the form's 'Scale' method.

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

Nov 21 '05 #2
Ellis,
In addition to the form's Scale method, you can use AutoScale = true & the
form will take care of it for you (I've hadn't had any real problems with
AutoScale, however I've seen reports other's have).

Charles Petzold's book "Programming Microsoft Windows With Microsoft Visual
Basic .NET - Core Reference" from MS Press includes a section on how
AutoScale & Scale works. Plus gives code & explains how to do your own
scaling...

Hope this helps
Jay

"Ellis Yu" <el******@transfield.com> wrote in message
news:%2***************@TK2MSFTNGP09.phx.gbl...
Dear all,

In vb6, I'll do it by getting the ratio between the resolution
setting in screen and in design mode. Afterward, adjust each control's
position and size with the ratio according to the control type. Is there
any
other way do it in .Net? Thanks

Best Rdgs
Ellis

Nov 21 '05 #3
Thanks Jay, but it seems not work in my case. When I change the resolution
from 600*480 to 1024*768, the screen layout can't retain the same as
600*480. It'll get smaller b4 change. And I found the default setting in
Form already marked to "True". And also, I try some code given from the Web
as below

Dim sf as SizeF

sf = Me.GetAutoScaleSize(me.Font)
Me.AutoScaleBaseSize = sf.ToSize

But it still don't work. It's so strange.

"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in message
news:e3**************@TK2MSFTNGP09.phx.gbl...
Ellis,
In addition to the form's Scale method, you can use AutoScale = true & the
form will take care of it for you (I've hadn't had any real problems with
AutoScale, however I've seen reports other's have).

Charles Petzold's book "Programming Microsoft Windows With Microsoft Visual Basic .NET - Core Reference" from MS Press includes a section on how
AutoScale & Scale works. Plus gives code & explains how to do your own
scaling...

Hope this helps
Jay

"Ellis Yu" <el******@transfield.com> wrote in message
news:%2***************@TK2MSFTNGP09.phx.gbl...
Dear all,

In vb6, I'll do it by getting the ratio between the resolution
setting in screen and in design mode. Afterward, adjust each control's
position and size with the ratio according to the control type. Is there
any
other way do it in .Net? Thanks

Best Rdgs
Ellis


Nov 21 '05 #4
Ellis,
As I stated Charles' book explains how it works.

I have a busy weekend, I will try to work up an example later...

Hope this helps
Jay

"Ellis Yu" <el******@transfield.com> wrote in message
news:e1**************@TK2MSFTNGP10.phx.gbl...
Thanks Jay, but it seems not work in my case. When I change the resolution
from 600*480 to 1024*768, the screen layout can't retain the same as
600*480. It'll get smaller b4 change. And I found the default setting in
Form already marked to "True". And also, I try some code given from the
Web
as below

Dim sf as SizeF

sf = Me.GetAutoScaleSize(me.Font)
Me.AutoScaleBaseSize = sf.ToSize

But it still don't work. It's so strange.

"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in message
news:e3**************@TK2MSFTNGP09.phx.gbl...
Ellis,
In addition to the form's Scale method, you can use AutoScale = true &
the
form will take care of it for you (I've hadn't had any real problems with
AutoScale, however I've seen reports other's have).

Charles Petzold's book "Programming Microsoft Windows With Microsoft

Visual
Basic .NET - Core Reference" from MS Press includes a section on how
AutoScale & Scale works. Plus gives code & explains how to do your own
scaling...

Hope this helps
Jay

"Ellis Yu" <el******@transfield.com> wrote in message
news:%2***************@TK2MSFTNGP09.phx.gbl...
> Dear all,
>
> In vb6, I'll do it by getting the ratio between the resolution
> setting in screen and in design mode. Afterward, adjust each control's
> position and size with the ratio according to the control type. Is
> there
> any
> other way do it in .Net? Thanks
>
> Best Rdgs
> Ellis
>
>



Nov 21 '05 #5
But I don't know why it remains the same even I call the method ".Scale" and
the autoscale is set to true
"Ellis Yu" <el******@transfield.com> wrote in message
news:#v*************@TK2MSFTNGP09.phx.gbl...
Dear all,

In vb6, I'll do it by getting the ratio between the resolution
setting in screen and in design mode. Afterward, adjust each control's
position and size with the ratio according to the control type. Is there any other way do it in .Net? Thanks

Best Rdgs
Ellis

Nov 21 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Rex_chaos | last post by:
hi all, I am sorry for the post first for it's a very popular question here. However, I have seen thousand of post here but no one can tell me HOW TO MAKE A HOMEPAGE RESOLUTION-INDEPENDENT. I have...
4
by: Ronny Sigo | last post by:
Hello all, Ik have made an Access application on my computer which has a screen resolution of 1024 x 768. However the goal is to run it on my girlfriend's computer which has a screen resolution of...
2
by: VMI | last post by:
How can I change the size of the forms in my Windows application when the screen resolution the user has is higher than the one I developed the application in? I have a customer that has a screen...
8
by: touf | last post by:
Hi, I've developped an application on a machine that have 1280,1024 , the forms look ok, WhenI change the resolution to 1024,768 the forms are biggest than the screen. Is there a way to resize...
5
by: Maxi | last post by:
I have a 30X16 cells table in my html page. Table height and width are set to 100%. I have set size of every cell inside the table to 24 pixel. When I open the html page in maximize state in...
9
by: ClearConcepts | last post by:
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...
7
by: aviad | last post by:
I am writing a Form application I need it to fit both resolution of 1600*1200 and 800*600 (and any other resolution that might jump in) the application is meant for regular PCs another question...
8
by: Lad | last post by:
Is it possible to change a picture resolution with Python? Let's say I have a picture with a resolution of 96 dpi and I would like to increase to 256dpi or higher. Thank you for your reply. LL
1
by: Greoasy | last post by:
I have an asp.net webapplication,designed in laptops having resolution 0f 1280x800. Now the same application when i run on a Desktop with a different resolution the display of the screen is...
6
by: John | last post by:
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
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.