Click here to Skip to main content
15,867,453 members
Articles / Desktop Programming / Windows Forms

Designing a Windows Form Where Size Exceeds Your Screen’s Resolution

Rate me:
Please Sign up or sign in to vote.
5.00/5 (2 votes)
20 Oct 2011CPOL1 min read 24.4K   6   1
Design forms beyond the size of our development machine's screen resolution

Sometimes, we need to design forms in our  applications beyond the size of our development machine's screen resolution. But the problem is, our development environment does not allow us to resize our forms beyond our screen resolution (screen resolution – borders to be exact).

One method is to do the development on the client resolution. But it’s not going to work all the time, if we have to do the development and send it across to a different physical location.

The other method is to insert a ‘Panel’ to the form and change its size to the one at the client's end. The one I am working at has the resolution of ‘1440 X 900’. But I want to make a form which fits for ‘1920 X 1200’. I change the Panel’s size to a bit less than ‘1920 X 1200’ because I have to leave space for the borders and the scroll bars. I would make it somewhere around ‘1870 X 1150’.

And change the following form properties also:

  • AutoScaleMode = None
  • AutoScroll = True
  • AutoSize = True
  • WindowState = Maximized

And you will note that there are two scroll bars available at design time with which you can scroll and place controls beyond your screen's resolution. And when run on the client environment, the form will maximize and since the panel is a bit smaller than the actual screen size, the scroll bars will not be visible.

271581/screen_01_thumb2.png

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Technical Lead Air Liquide Industrial Services (Singapore)
Singapore Singapore
My passion lies in building business intelligence and data-based solutions, writing about things I work with and talking about it. New technologies relevant to my line of work interest me and I am often seen playing with early releases of such technologies.

My current role involves architecting and building a variety of data solutions, providing database maintenance and administration support, building the organization’s data practice, and training and mentoring peers.

My aspiration over the next several years is to achieve higher competency and recognition in the field of Data Analytics and move into a career of data science.


Specialities: SQL Server, T-SQL Development, SQL Server Administration, SSRS, SSIS, C#, ASP.Net, Crystal Reports

Comments and Discussions

 
GeneralMy vote of 5 Pin
Manoj Kumar Choubey28-Nov-12 18:26
professionalManoj Kumar Choubey28-Nov-12 18:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.