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

Adjusting window form size according to the screen resolution

3
hello,
i want to know how to adjust my windows form according to the Operating system resolution. I'm working a on VB.Net. We have developed forms with 1152*864 pixels and we need to deploy our application on a laptop with maximum resolution of 1024*768 pixels. Also we cannot add scroll bars.
Mar 29 '07 #1
2 5462
dip_developer
648 Expert 512MB
hello,
i want to know how to adjust my windows form according to the Operating system resolution. I'm working a on VB.Net. We have developed forms with 1152*864 pixels and we need to deploy our application on a laptop with maximum resolution of 1024*768 pixels. Also we cannot add scroll bars.
You can get Systems current resolution through this code...

Expand|Select|Wrap|Line Numbers
  1. Dim intX As Integer = Screen.PrimaryScreen.Bounds.Width
  2.  Dim intY As Integer = Screen.PrimaryScreen.Bounds.Height
Now instead of setting your windows form's Width and Height in the Properties Box or let it Hard coded in code behind , you can use a Relative Width and Height like....

Expand|Select|Wrap|Line Numbers
  1. Form1.Height=Y/2
  2. Form1.Width=X/2
Mar 29 '07 #2
AgNO3
3
this does not work cos it will adjust the screen, but my controls still go out of the screen and i cannot use scroll bars. in resolution 1152*864 i had placed the control such that it would appear completely in the screen. but with lower resolution i need scroll bars to access them and my problem is i cannot use scroll bars.
Mar 30 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Alexia | last post by:
Hi, just a quick question How do i make sure that the form shown is the size of my screen. i.e i want the form size to adjust to the resolution that is set on my monitor.
2
by: Sagiv | last post by:
Hi, I guess this should be an easy one (and yet..) How do I adjust my form's size to the screen upon which it is displayed(programmatically ,of course). Thanks, Sagiv
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...
1
by: njuneardave | last post by:
hi, i currently have a pretty large window that needs a minimum of 1280x1024 screen resolution so that it can fit on my screen. how do i make the window (and ALL other controls on the window)...
0
by: Ashoksinh | last post by:
Hi group, Is any one how can i code my application in vb.net that it will resize its form size according monitor size or screen resolution changes? If any one know please help me! Its urgent.
1
by: Venkatganesh | last post by:
I have using vb.net for my project. i want to get screen resolution in that project. i want give form size according to windows resolution size. any solution forward to me....
1
by: sdanda | last post by:
Hi, I am using vb.net windows applications.I am adding controls dynimically.Is there any possibility to increase the form size according to the controls that i added dynimically.
14
by: malcster2 | last post by:
hello i am putting together a web site that i would like to be virtually identical in all screen resolutions. 99% of the elements have % widths and height, rather than px measurements. so this...
4
by: dipalipatel | last post by:
Hi, I have one c# smart device application created in .net 2005. I have fixed size form for my one device. Now i have another device and screen size is chaged menas it is more wider and short...
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...
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:
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
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...
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,...

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.