Solved

Changing the size of a Windows form to something really large

Posted on 2008-06-12
8
223 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
8 Comments
 
LVL 69

Expert Comment

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

Expert Comment

by:MuhammadAdil
Comment Utility
Change AutoScroll property true.
0
 
LVL 6

Expert Comment

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

Regards,
Adil Fazal
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 55

Expert Comment

by:Jaime Olivares
Comment Utility
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
Comment Utility
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 250 total points
Comment Utility
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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Article by: Ivo
Anonymous Types in C# by Ivo Stoykov Anonymous Types are useful when  we do not need to follow usual work-flow -- creating object of some type, assign some read-only values and then doing something with them. Instead we can encapsulate this read…
Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

728 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now