473,804 Members | 2,615 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Resize a form depending on the screen resolution

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 the form depending on the screen resolution ?

Thanks
Nov 20 '05 #1
8 15858
I dont think there is anything of that kind. In the
application start up, U can set the size of the MDI form
based on the screen resolution and child windows can fit
into it.
-----Original Message-----
Hi,
I've developped an application on a machine that have 1280,1024 , the formslook ok,
WhenI change the resolution to 1024,768 the forms are biggest than thescreen.

Is there a way to resize the form depending on the screen resolution ?
Thanks
.

Nov 20 '05 #2
What about the controls?

I mean that if the form size become 2/3 of the original size, tha controls
size will follow.
"mahesh" <ma**********@w ipro.com> wrote in message
news:03******** *************** *****@phx.gbl.. .
I dont think there is anything of that kind. In the
application start up, U can set the size of the MDI form
based on the screen resolution and child windows can fit
into it.
-----Original Message-----
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 the form depending on the screen

resolution ?

Thanks
.

Nov 20 '05 #3
"touf" <to******@hotma il.com> wrote in
news:eN******** ******@TK2MSFTN GP10.phx.gbl:
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 the form depending on the screen resolution ?

ComponentOne Studio has a ResizeComponent :

http://www.component1.com/products.a...&ProductID=100

--
Lucas Tam (RE********@rog ers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
Nov 20 '05 #4
Hi,
Instead of trying so many things why don't you add a line of code in every
form on resize event. it is actually very simple. if you write it for one
form it can be copied and pasted every where. By the way I assume there are
10 controls on every form.

Regards
Kishor


"touf" <to******@hotma il.com> wrote in message
news:eN******** ******@TK2MSFTN GP10.phx.gbl...
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 the form depending on the screen resolution ?

Thanks

Nov 20 '05 #5
Hi, thanks everyone
Kishor, can you explain me more about the code that can be added to the
resize event , please

Thanks
"Kishor" <ki*********@hu rix.com> wrote in message
news:#0******** ******@TK2MSFTN GP09.phx.gbl...
Hi,
Instead of trying so many things why don't you add a line of code in every
form on resize event. it is actually very simple. if you write it for one
form it can be copied and pasted every where. By the way I assume there are 10 controls on every form.

Regards
Kishor


"touf" <to******@hotma il.com> wrote in message
news:eN******** ******@TK2MSFTN GP10.phx.gbl...
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 the form depending on the screen resolution ?

Thanks


Nov 20 '05 #6
Hello,

"touf" <to******@hotma il.com> schrieb:
Is there a way to resize the form depending on the screen
resolution ?


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

Monitor size:

SystemInformati on.PrimaryMonit orSize
SystemInformati on.WorkingArea
SystemInformati on.VirtualScree n
Screen.PrimaryS creen.Bounds
Screen.PrimaryS creen.WorkingAr ea

When using multiple monitors:

Screen.AllScree ns

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #7
Hello,

Have a look at Klik! SizeLib.Net...T he SizePos control in this library may
be helpfull...

http://www.kliksoft.com/?S=2&SS=3

Regards...

Özden

"Kishor" <ki*********@hu rix.com> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
Hi,
Instead of trying so many things why don't you add a line of code in every
form on resize event. it is actually very simple. if you write it for one
form it can be copied and pasted every where. By the way I assume there are 10 controls on every form.

Regards
Kishor


"touf" <to******@hotma il.com> wrote in message
news:eN******** ******@TK2MSFTN GP10.phx.gbl...
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 the form depending on the screen resolution ?

Thanks


Nov 20 '05 #8
Hi,
U can handle control re-sizing by using the Anchor
property of the controls efficiently.

Regards
Mahesh
-----Original Message-----
What about the controls?

I mean that if the form size become 2/3 of the original size, tha controlssize will follow.
"mahesh" <ma**********@w ipro.com> wrote in message
news:03******* *************** ******@phx.gbl. ..
I dont think there is anything of that kind. In the
application start up, U can set the size of the MDI form
based on the screen resolution and child windows can fit
into it.
>-----Original Message-----
>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 the form depending on the
screen resolution ?
>
>Thanks
>
>
>.
>

.

Nov 20 '05 #9

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

Similar topics

6
5649
by: David Hayes | last post by:
juglesh <juglesh@nospamRadioKDUG.com> wrote in "Re: how to maximize the browser window that fits the monitor size?" (Saturday, January 01, 2005 3:12 AM): > > >I want to maximize the browser window when I open a new window. > > function expand() { > window.moveTo(0,0); > window.resizeTo(screen.availWidth, screen.availHeight); > }
16
11883
by: David Lauberts | last post by:
Hi Wonder if someone has some words of wisdom. I have a access 2002 form that contains 2 graph objects that overlay each other and would like to export them as a JPEG to use in a presentation. I can do this individually for each graph but this does not help me as I need both on the same JPEG. I thought I would try an export the form that contains both but I am having trouble. (My VBA is self taught and a little knowledge is...
5
2589
by: Ellis Yu | last post by:
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
5
5634
by: gilgames | last post by:
I am new in VB.Net, I need some help. I want to resize my dialogs dynamically (so that a dialog made for 1280x1024 screens shows properly on 800x640 screen. I make the calculation in the Handles MyBase.Load event sub Everything works fine, except if the original screen exceeds the size of the new screen. Some debugging shows that frm.Height = CType((frm.Height - bgtl) * heightRatio + bgtl, Integer)
9
2366
by: Adam Honek | last post by:
Hi, In VB6 and earlier if the form size was expanded by the user or maximized there had to be specific code to handle controls on the form to scale with with it. In VB.net I recall in one of the MSDN videos seeing that Windows forms have a property that auto scale controls within the form. The problem is I don't see it and the ones I try don't work.
1
2734
by: Rich | last post by:
Hello, I have a child form in a parent MDI form. The childform is being shrunk and cannot be resized when screen resolution is 800x600. The end user who uses my app cannot see stuff on the screen too well if the resolution is smaller than 800x600 (why did it have to be my app?) Yes, I know, get a bigger screen - $$. Management is on it - just not right now. The parent form can be resized but not the child form. What is the way...
1
5608
by: Bob Alston | last post by:
I have a system where many subforms are used. Often the size of the subform had to be larger than could be displayed without scrolling. I set the height of the subform to the typical height appropriate for the typical screen resolution they were using. Now some users have decided to use higher screen resolutions, up to 1280/1024. When they maximize the form, that of course works but the size of the main form control containing the...
2
1523
by: ezhils | last post by:
How to resize the form controls based on the screen resolution?
10
44091
by: =?Utf-8?B?UmljaA==?= | last post by:
A lot of users at my workplace use different screen resolutions, and I build apps to use 1680 x 1050 pixels res by default. But some users are using 800 x 600, and the apps are too large for their screen. I used to write code in Java a few years ago (2005), and you could stretch a form with the mouse and all the controls and fonts would resize to larger or smaller size. Does .Net framework 3.5 support this kind of functionality? Or -...
0
9706
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10569
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10325
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10315
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7615
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5519
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4295
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2990
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.