Panel1 scroll bars ... Hide them but still be able to scroll my image that is in Picturebox

I use VB 2008 Express

What I have and what I need

Panel called Panel1
Picturebox called PictureBox1

Picturebox1 is within Panel1 ...... Picturebox1 contains a map image of which I can grab an scroll the image like you can in Google Maps
I want to do 2 things

1.  I want the scroll bars that are showing to not show .... so that I can still scroll by grabing the image of which I already have the code in place to do I just want the scroll bars gone ... is there an override that will tell the panel not to draw them?

2. I want to click on spot and the image in the picturebox1 that is in the panel1 scroll to clicked position

vbMarkO
vbMarkOAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Mike TomlinsonHigh School Computer Science, Computer Applications, and Mathematics TeachersCommented:
It really depends on how you are currrently allowing the user to "pan" the image.  Have you tried setting the Panels AutoScroll() Property to False?
vbMarkOAuthor Commented:
Well here is a glimps of how they are doing it .....

Maybe this will tell you enough
If e.Button = Windows.Forms.MouseButtons.Left Then
 
            'Here we get the change in coordinates.
 
            Dim DeltaX As Integer = (m_PanStartPoint.X - e.X)
 
            Dim DeltaY As Integer = (m_PanStartPoint.Y - e.Y)
 
            'Then we set the new autoscroll position.
 
            'ALWAYS pass positive integers to the panels autoScrollPosition method
 
            Panel1.AutoScrollPosition = _
            New Drawing.Point((DeltaX - Panel1.AutoScrollPosition.X), _
            (DeltaY - Panel1.AutoScrollPosition.Y))
 
        End If

Open in new window

Mike TomlinsonHigh School Computer Science, Computer Applications, and Mathematics TeachersCommented:
You are setting the AutoScrollPosition to move the Image so you can't turn off the SrollBars.

If you want to be able to move it without scrollbars then you'll need to write custom code to manually adjust the Location() Property of your PictureBox as the mouse is moved....

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
vbMarkOAuthor Commented:
Ok, I could possibly live with the scrolls but 2nd part is how about user clicking on spot and the image center or scroll to the clicked position like in google    ... you click on a on image and the image centers on the new position

Anythoughts ....

vbMarkOAuthor Commented:
Going to live with the scroll bars for now ... thanx for the info
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.