473,756 Members | 3,663 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to attach a scroll bar to a picturebox

MJ
as topic, anyone can provide some codes that enable a scroll bar to a picturebox when the picture expand?

Nov 20 '05 #1
4 1661
Cor
HI MJ,

Start first with looking what autoscroll = true on your form will do for
you.

I hope that helps?

Cor
as topic, anyone can provide some codes that enable a scroll bar to a picturebox when the picture expand?

Nov 20 '05 #2
Hi,

I would place the picturebox on a panel. I would set the autoscroll
of the panel to true. The panel will handle the scrolling for you if the
picturebox is bigger than the panel.

Ken
--------------
"MJ" <an*******@disc ussions.microso ft.com> wrote in message
news:07******** *************** ***********@mic rosoft.com...
as topic, anyone can provide some codes that enable a scroll bar to a
picturebox when the picture expand?

Nov 20 '05 #3
* "=?Utf-8?B?TUo=?=" <an*******@disc ussions.microso ft.com> scripsit:
as topic, anyone can provide some codes that enable a scroll bar to a
picturebox when the picture expand?


You can add the picturebox control to a panel control with 'AutoScroll'
= 'True'. If the pixturebox gets larger than the panel, scrollbars will
be showed. The picturebox provides a 'SizeMode' property which allows
you to specify the size mode.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #4
Use Crazy Glue,

but in case that does not work, pub the picture and the scroll bar inside a
panel

francisco

"MJ" <an*******@disc ussions.microso ft.com> wrote in message
news:07******** *************** ***********@mic rosoft.com...
as topic, anyone can provide some codes that enable a scroll bar to a picturebox when the picture expand?

Nov 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
7907
by: Anand Ganesh | last post by:
Hi All, I am trying to draw a picture in a panel control. It is drawing up correctly. When the picture size is greater than the panel control, I am expecting horizontal and vertical scroll bars to draw up but for some reason it is not appearing. I have set Autoscroll = true and even the margin values for scroll but the
3
13374
by: Alberto | last post by:
I'm trying to load an image in a PictureBox but I want the PictureBox has always the same size and if the image is bigger, show a scrollBars. How can I do it? Thank you
0
1241
by: 6tc1 | last post by:
Hi all, I have a class (call it class A) that extends UserControl (there is no reason that this couldn't extend Panel). I have a few PictureBox objects in class A. When I increase the size of the pictures in the PictureBox objects, I would also like to increase the window, so that the scroll bars appear. For some reason none of the following methods force the scroll bars to appear: this.ClientSize = new Size(layout_w, layout_h);...
1
1868
by: Dica | last post by:
i've got an image too large to fit inside my picture control. how do i get horizontal and vertical scroll bars?
4
12899
by: midicad2001 | last post by:
I have been researching this issue and have come across a number of solutions apparently written for VB5 or 6 and don't work under .NET, yes folks that is progress! Someone in this ng suggested just drop your picturebox into a panel with autoscroll=TRUE. I am wondering if this will work for my desired application - see details.
7
18212
by: Sharon | last post by:
I’m using the Panel control that contains a PictureBox control (for implementing the http://www.codeproject.com/cs/miscctrl/PictureBox.asp). The Panel is set to AutoScroll = true. I wish to scroll the appearing vertical and horizontal scrolls bars of the Panel to the middle of their scrolling range so the contained PictureBox will be centered inside the Panel. But I could not find a way to get the scrolls bars for doing that.
1
3922
by: id86 | last post by:
Hello everybody! I've a problem with MouseMove event in a C# project using Visual Studio 2005. This is my situation: there is a PictureBox (bigger than the panel in which it is) and I want that, when the user moves his mouse over some sensible areas (that are other invisible small PictureBox), the cursor has to become a hand. In order to realize it, I wrote this code: private void stradario_MouseMove(object sender, MouseEventArgs...
0
1221
by: swagatikasahoo | last post by:
how to display all lines if i will scroll the picturebox. hi, ok i m sending the code. ****************************************************** Private Sub PictureBox1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles PictureBox1.Paint eGraphics = e.Graphics TryToCreateRec(eGraphics) PictureBox1.Refresh() End Sub Public Sub TryToCreateRec(ByVal eGraphics As Graphics) Dim blackPen As New Pen(Color.White,...
4
2955
by: delorian0815 | last post by:
Hi, I programmed a windows forms application. it contains several pictureBoxes, each showing the first picture in a folder. When the mouse is over the pictureBox and you turn your mousewheel, it shows the next/prev picture. This works fine. The picturebox is getting focus when the mouse enters and the picture changes with the wheel. But the window is scrolling, too. How can i prevent the window scroll when one of the pictureBoxes has...
0
9456
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
9273
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10032
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9872
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
9841
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
9711
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...
1
7244
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6534
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
5303
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.