473,769 Members | 5,601 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to add scrollbars in picturebox ??

12 New Member
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 7841
Plater
7,872 Recognized Expert Expert
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
2734
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
2574
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 anything like this in the properties for the picturebox. How can I get scrollbars for my picturebox?
1
17532
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 scrollbars. Actually it boils down to a form in a form in a certain way, does anyone have any idea if there is allready such a component around somewhere, and if not from which class to start to create it? thx,
1
4176
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 i draw a bitmap to the picturebox I have trouble displaying graphics inside the picturebox. I pictureBox1.image = Image.FromFile("OutBinary.bmp"); This image is displayed in the picturebox with scrollbars. Then i try to
0
2124
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 presses the left mouse button and moves the mouse, the mouse cursor stays frozen on screen, but the image within the picturebox is panned around (the image is not technically moving, but the location of the picturebox via the autoscrollposition...
8
10469
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 like moving it, rotating it. Therefore, a solution with two pictureboxes (like the one given in MSDN) is of no use to me.Thanks in advance.
5
11121
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 set? Thank you very much for your time and consideration in this matter! Christopher Koeber
3
1290
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 : http://www.mesnews.net
0
2664
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 panel.There are two viewing preferences available: to view the image with scrollbars (the original image unsized), and to view the iamge without scrollbars (the image resized to fit within the panel's viewing range.) When I resize the image so that...
0
9587
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10045
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9993
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9863
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8870
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6672
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5447
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3561
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.