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

Home Posts Topics Members FAQ

Scrollbars for a Picturebox

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.
Nov 20 '05 #1
8 10468
Hi,

The easiest way with vb.net is to place the picturebox on a panel.
Set the panels autoscroll to true. The panel will handle the scrolling for
you.

Ken
-----------------
"Yogiman" <an*******@disc ussions.microso ft.com> wrote in message
news:50******** *************** ***********@mic rosoft.com...
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.

Nov 20 '05 #2
* "=?Utf-8?B?WW9naW1hbg= =?=" <an*******@disc ussions.microso ft.com> scripsit:
Can anybody tell me how would I attach scrollbars to a picturebox ?


Add the picturebox control into a panel control. Set the panel's 'AutoScroll'
propery to 'True' and set the picturebox's 'SizeMode' property to change
the size of the picturebox whenever a new image is loaded into it.

Sample:

<http://www.mvps.org/dotnet/dotnet/samples/windowsandforms/downloads/Screenshot.zip>

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #3
Hi ,
Thanks both of you for your answers. But this does not work either because as I had mentioned earlier, I need to move and rotate the picturebox as well.So putting the picturebox in a panel does not achieve all these things. Can I request you to suggest me some other solution ? Thanks again.
Nov 20 '05 #4
Cor
Hi Yogiman,

Did you look in this newsgroup

Drawing
<news://msnews.microsof t.com/microsoft.publi c.dotnet.framew ork.drawing>

Web interface:

<http://msdn.microsoft.com/newsgroups...ups/loadframes
..asp?icp=msdn& slcid=us&newsgr oup=microsoft.p ublic.dotnet.fr amework.drawing >

Bop Powell is active there here is his webpage

http://www.bobpowell.net/gdiplus_faq.htm

I hope this helps

Cor
Thanks both of you for your answers. But this does not work either because

as I had mentioned earlier, I need to move and rotate the picturebox as
well.So putting the picturebox in a panel does not achieve all these things.
Can I request you to suggest me some other solution ? Thanks again.
Nov 20 '05 #5
"Yogiman" <an*******@disc ussions.microso ft.com> schrieb
Hi ,
Thanks both of you for your answers. But this does not work either
because as I had mentioned earlier, I need to move and rotate the
picturebox as well.So putting the picturebox in a panel does not
achieve all these things.
Maybe not all but some of them?
Can I request you to suggest me some other
solution ? Thanks again.


Sorry, I don't have one.

--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #6
* "=?Utf-8?B?WW9naW1hbg= =?=" <an*******@disc ussions.microso ft.com> scripsit:
Thanks both of you for your answers. But this does not work either
because as I had mentioned earlier, I need to move and rotate the
picturebox as well.So putting the picturebox in a panel does not achieve
all these things. Can I request you to suggest me some other solution ?


Do you want to rotate the control or the picture shown inside the
control?

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #7
I want to rotate and move the whole picturebox. Actually it wont matter how I do that. But the end effect should be as though I am moving and rotating the whole picturebox.This is the requirement of the client you see, since he is a doctor and would like to see the pictures of his patient from all angles :).Thanks.
Nov 20 '05 #8
* "=?Utf-8?B?WW9naW1hbg= =?=" <an*******@disc ussions.microso ft.com> scripsit:
I want to rotate and move the whole picturebox. Actually it wont
matter how I do that. But the end effect should be as though I am moving
and rotating the whole picturebox.This is the requirement of the client
you see, since he is a doctor and would like to see the pictures of his
patient from all angles :).Thanks.


You may want to create a new 'Bitmap', then get a 'Graphics' object for
this bitmap by calling 'Graphics.FromI mage' and then use
'Graphics.Rotat eTransform' + 'Graphics.DrawI mage' to rotate the image.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #9

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

Similar topics

2
2733
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
1
2862
by: Martin | last post by:
This is probably a very easy one but I just can't put my finger on the communicating events name:- I have a MDIform with a couple of child forms. The child forms scroll vertically at run time using the automatically supplied scrollbars of the MDIform. When scrolling , or immediately after scrolling, the child forms I want a procedure to be called. How do I do this??. I have tried the MDIform_MouseUp event and this works correctly when...
6
11488
by: adrien | last post by:
Hi, (also posted in netscape.public.mozilla.browser) i use netscape 7 and want to hide the scrollbars of the window when something happens. I tried this: window.scrollbars.visible=false window.scrollbars.visibility="no" .... nothing works Is it also possible only to hide the vertical scrollbar instead of both?
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
17531
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,
5
11120
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
1289
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
5
3483
by: james | last post by:
How can I control the placement of scrollbars in mdi child windows? I need to place a control at the top of my child form and this control needs to always be visible. The rest of the page needs to scroll. However the default behavior has the control scroll with the rest of the page. Even a toolstrip demonstrates this same behavior. Any ideas.
1
7840
by: DeathFrag | last post by:
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...
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,...
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
8712
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
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
5141
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5303
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3805
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3358
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2666
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.