Solved

Adding Scroll Bars

Posted on 2003-11-27
4
425 Views
Last Modified: 2010-04-16
I have a C# program where I create and display a bitmap on a form. Sometimes the bitmap is too wide to fit on the form. How can I add scroll bars to access the whole bitmap?
0
Comment
Question by:jc31415
  • 3
4 Comments
 
LVL 20

Expert Comment

by:TheAvenger
ID: 9836203
There are scroll bar controls in the Toolbox. Then you can handle the movement of the scroll bars and make tne needed changes to the picture.

Or put the bitmap control in a panel with scroll bars. Then resize the bitmap control to be as big as the picture itself. Then the panel will automatically show the scroll bars.
0
 

Author Comment

by:jc31415
ID: 9837572
When I selected scroll bars from the Toolbox they seemed to only apply to a panel. How can they be made to apply to the form? How can I put the bitmap in a panel?
0
 
LVL 20

Expert Comment

by:TheAvenger
ID: 9837600
What control do you currently use to put the bitmap in? PictureBox?
0
 
LVL 20

Accepted Solution

by:
TheAvenger earned 125 total points
ID: 9837615
If yes, put a panel on the form, assign scroll bars to it, then put the picture box inside the panel. Then tell the picture box to resize itself based on the image (property SizeMode set to AutoSize). This should do the whole work
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Icons and Colors for Terms 3 24
How to write a select year(max(datefield) in EntitySQL in  c# entity framework 12 29
Class object 2 27
Angular JS Route 3 52
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.
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

920 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

12 Experts available now in Live!

Get 1:1 Help Now