Scrollbars for a Picturebox

G

Guest

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.
 
K

Ken Tucker [MVP]

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
 
G

Guest

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.
 
C

Cor

Hi Yogiman,

Did you look in this newsgroup

Drawing
<
Web interface:

<http://msdn.microsoft.com/newsgroups/default.asp?url=/newsgroups/loadframes
..asp?icp=msdn&slcid=us&newsgroup=microsoft.public.dotnet.framework.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.
 
A

Armin Zingler

Yogiman said:
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
 
H

Herfried K. Wagner [MVP]

* "=?Utf-8?B?WW9naW1hbg==?= said:
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?
 
G

Guest

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.
 
H

Herfried K. Wagner [MVP]

* "=?Utf-8?B?WW9naW1hbg==?= said:
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.FromImage' and then use
'Graphics.RotateTransform' + 'Graphics.DrawImage' to rotate the image.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top