?
Solved

Changing the size of a Windows form to something really large

Posted on 2008-06-12
8
Medium Priority
?
240 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
Independent Software Vendors: 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

752 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