Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Adding Scroll Bars

Posted on 2003-11-27
4
Medium Priority
?
432 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
[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
  • 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 500 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
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…

719 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