Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Changing the size of a Windows form to something really large

Posted on 2008-06-12
8
Medium Priority
?
241 Views
Last Modified: 2010-04-15
What is the best way to change the size of a Windows form to something larger? What I mean is, I'd like to create a form in which the size from top to bottom exceeds the size of the currently viewable area, and I'd like scroll bars to appear alongside for scrolling from top to bottom. What is the best manner of doing this?

Thank You,
Ryan Ross
(my brain is fried)
0
Comment
Question by:rossryan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 21768900
have you tried the AutoScroll property on the Form?
0
 
LVL 6

Expert Comment

by:MuhammadAdil
ID: 21769006
Change AutoScroll property true.
0
 
LVL 6

Expert Comment

by:MuhammadAdil
ID: 21769024
If you have put panels you need to enable AutoScroll property of these panels also.

Regards,
Adil Fazal
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 21771818
Although it is possible using the AutoScroll, it is not recommended. Better you can divide your form into multiple parts and use a TabControl to display your control in pages.
0
 

Author Comment

by:rossryan
ID: 21773488
Allow me to put it to you this way: when I type in a value for a Height of 3000 for the form, the form refuses to resize to this value. How can I get the form to resize to this value?
0
 
LVL 55

Accepted Solution

by:
Jaime Olivares earned 1000 total points
ID: 21773611
this can be achieved with the WinAPI's MoveWindow() function, something like:

// will require this at the begining of your file
using System.Runtime.InteropServices;

// put this inside your form declaration
[DllImport("user32")]
public static extern int MoveWindow(IntPtr hwnd, int x, int y, int width, int height, int repaint);

// invoke this from some form's method
MoveWindow(this.Handle,0,0,1000,3000,1);
0

Featured Post

Tech or Treat! - Giveaway

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question