How do I create a scrolling panel on winform?

Posted on 2006-03-29
Last Modified: 2008-01-09
I have a winform that is 800x600.
The form will not 'hold' all my controls. I'm out of screen 'real estate'.
I want to add a panel to the form that will scroll with all my control.. just like a webpage does in IE.
My panel needs to be 800x1200.
How do I make a scrolling panel 800x1200 that will scroll up and down in a winform and display all my controls?

I can add a scrolling panel to a winform but the size and scroll is limited to the form size.

Question by:JElster
    LVL 85

    Accepted Solution

    I haven't played with it to much, but it seems that the IDE will not let you make the form bigger than the screen at DESIGN-TIME.

    However, at RUN-TIME, I changed the location of my controls via code to larger than screen size and the scrollbars appeared and worked correctly with AutoScroll() set to true.
    LVL 1

    Author Comment

    I need to the form to remain 800x600 at runtime..... Yes, I can't make the form bigger to position the controls and then set the screen back to 800x600.  
    LVL 85

    Expert Comment

    by:Mike Tomlinson
    Can you change resolutions and design your form then?

    Other than that I think you have to position the controls at run-time via code...
    LVL 1

    Author Comment

    No... I have to find another monitor.  It's a weird limitation - that you can design a form larger than your screen.
    LVL 5

    Assisted Solution

    If i get your requirements right, you need a larger virtual area to place your controls and should be able to scroll to these. as you can't make the form bigger due to your screen resolutions, you need to postion your your controls in your code ie at runtme. Just set Form's autoscroll propert to true as Idle_Mind said. scrollbars will be displayed when any child control is placed outside visible area.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Join & Write a Comment

    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…
    Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    how to add IIS SMTP to handle application/Scanner relays into office 365.

    755 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

    24 Experts available now in Live!

    Get 1:1 Help Now