473,324 Members | 1,678 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

How to add scrollbars in picturebox ??

I've been trying with failure to add scrollbars( both vertical and horizontal) to my picturebox.
Am coding in C#.NET and i need some help on how to add scrollbars. The situation is that i load an image at runtime into the picturebox, but when the image size exceeds the form size i cant see the whole image and so i want to add scrollbars if the image size exceeds 800x600 at runtime.

Please help me,
Thanking you all in advance

Waiting in anticipation....
Feb 19 '08 #1
1 7810
Plater
7,872 Expert 4TB
Add a panel object, assign it a max size and give it scrollbars.
Then place your picturebox inside it and set it to "Dock-all" (I think dock-all is right anot anchoring all 4 sides to the panel)
There might have to be a few extra lines of code when you assign a picture to the picturebox, to make sure the panel resizes correctly, but it will give you your scrollbars.
Feb 19 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: JR | last post by:
How can i insert scrollbars to my form. I have textboxen that are created through runtime with Ubound. But on a small resulution they don't fit on the screen. Thanks a lot
0
by: JH | last post by:
I wish to create scrollbars for a picturebox object when lines are drawn outside the picturebox. The main form has the properties AutoMinScrollSize which makes this easier, but I don't see...
1
by: Kristof Nachtergaele | last post by:
Hi, I'm looking for something, which acts as a container, that I can drop onto my form and which has a size that is bigger than the visible part, the invisible pazrt being scrollable to with...
1
by: James Dean | last post by:
I am drawing in a picturebox and am having some problems. I display outputted images in the picturebox. If the image is too big for the client area then i have scrollbars. The problem is that once...
0
by: Paul L | last post by:
I've created a picturebox inside a panel control with autoscroll enabled. The picturebox is twice the size of the panel so scrollbars are always shown. What I would like to do, is when the user...
8
by: Yogiman | last post by:
Hi Can anybody tell me how would I attach scrollbars to a picturebox ? The example given in MSDN is pretty good.But I have a different problem. I have to do other stuff with the picturebox as well...
5
by: Christopher Kurtis Koeber | last post by:
Dear All, This may sound like an elementary question but how do you implement scrollbars for the Picturebox control. Do I have to create my own code to do this or is there some property that I can...
3
by: Joey | last post by:
Hello friends, somebody could help he/she stops to place vertical and horizontal scrollbars to a picturebox. Thank you and greetings. -- Ceci est une signature automatique de MesNews. Site :...
0
by: mhospodarsky | last post by:
Hi-- I am using VB.Net 2002 for this app. I am working with Tiff and jpeg images. I have a picturebox set up that I use to view the images. I have the picture box inside of a scrollable...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.