Solved

Adding Scroll Bars

Posted on 2003-11-27
4
424 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
Comment Utility
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
Comment Utility
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
Comment Utility
What control do you currently use to put the bitmap in? PictureBox?
0
 
LVL 20

Accepted Solution

by:
TheAvenger earned 125 total points
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Article by: Ivo
C# And Nullable Types Since 2.0 C# has Nullable(T) Generic Structure. The idea behind is to allow value type objects to have null values just like reference types have. This concerns scenarios where not all data sources have values (like a databa…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

772 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

14 Experts available now in Live!

Get 1:1 Help Now