473,387 Members | 1,545 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,387 software developers and data experts.

size and position

I have a program I am writing on my desktop computer with a screen
resolution
of 1024 by 768 when I run the program on my laptop with a screen
resolution of 1280 by 768. the size and position of the controls are
changed. I
have used a number of :

TabControl1.Location = New Point(310, 14 + 12)

TabControl1.Size = New Size(580, 32)

Panel1.Location = New Point(310, 40 + 16)

Panel1.Size = New Size(580, 432)

Could this be the problem?

If so how can I fix this, is there a need to scale the controls?

If so how is this done?
Nov 21 '05 #1
2 1178
Tom,

It will never look the same.

Have a look at the dock and anchor properties of the form. That will
probably fix your problem the most.

I hope this helps,

Cor
Nov 21 '05 #2
Tom,
In addition to the other comments.

It sounds like you have your desktop running at 96 DPI & your desktop
running at 120 DPI (or visa versa). Correct?

I have one project where I overrode Control.ScaleCore to scale my Point &
Size values, however my Point & Size values were fields of my type.

You may be able to use Form.AutoScaleBaseSize to scale your inline Point &
Size values.

Using Control.ScaleCore I have not seen a real difference when running at
either 96 DPI or 120 DPI, although I've seen many statements that auto
scaling doesn't work, at least doesn't work as well as it should. I know
..NET 2.0 has improved support for AutoScale.

http://msdn2.microsoft.com/library/e...us,vs.80).aspx
http://msdn2.microsoft.com/library/h...us,vs.80).aspx
http://msdn2.microsoft.com/library/f...us,vs.80).aspx

The one thing I like about the new properties is that they are at the
container control level & not the Form level, allowing control libraries to
scale better.

I have not done a lot with the above properties yet.

Hope this helps
Jay

"Tom McL." <tb***@cwnet.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
|I have a program I am writing on my desktop computer with a screen
| resolution
| of 1024 by 768 when I run the program on my laptop with a screen
| resolution of 1280 by 768. the size and position of the controls are
| changed. I
| have used a number of :
|
| TabControl1.Location = New Point(310, 14 + 12)
|
| TabControl1.Size = New Size(580, 32)
|
| Panel1.Location = New Point(310, 40 + 16)
|
| Panel1.Size = New Size(580, 432)
|
| Could this be the problem?
|
| If so how can I fix this, is there a need to scale the controls?
|
| If so how is this done?
|
|
Nov 21 '05 #3

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

Similar topics

35
by: wired | last post by:
Hi, I've just taught myself C++, so I haven't learnt much about style or the like from any single source, and I'm quite styleless as a result. But at the same time, I really want nice code and I...
12
by: Brett L. Moore | last post by:
Hi, I have had trouble determining whether the STL list.size() operation is O(1) or O(n). I know the list is a doubly-linked list, so if the size() operation begins at the head, then counts to...
2
by: Billy | last post by:
Hi, This is in connection to the tread: Re: changing browser text settings?? I am wondering if there is a way to retrieve the browsers text size (not change! ;-) ) so that I can dynamically...
2
by: grayFalcon | last post by:
Hello! I've got a small problem here. I'm trying to write some code that would generate a drop-down menue for me, where I'd just need to enter the menu- and submenu items into an array. The...
3
by: spencer | last post by:
Hello, I have an index page with an autoscroller writen with CSS. The problem is the scrolling content(text and inages)'s position is correct but will off position when the broswer(IE) window...
5
by: Francois Soucy | last post by:
Hi all! I've created a personal control. This control is mainly a panel with some other stuff in. I want to know if it's possible to know the size of the container of this control? I mean that my...
14
by: Galen Somerville | last post by:
My current screen resolution is set to 1024 x 768. My form size always comes up as 1032 x 748. I have tried the help sample ' Retrieve the working rectangle from the Screen class ' using the...
4
by: BrianKE | last post by:
I am attempting to create an app that will run "on top" of another app. My app will create a transparent window over the other app for the purpose of displaying information. I am able to create...
17
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I find the size of a browser window?...
20
by: Ashit Vora | last post by:
Hi, I 'm new to C programming and 'm stuck somewhere. I want to find the size of a file. I couldn't find a proper way of doing it. What I was planning to do is... Open the requested file,...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.