Scrollbar Question
From: Ron Dahl (rdahl_at_ghp.com)
Date: 08/17/04
- Next message: Alejandra Parra: "doubt...?"
- Previous message: Ken Tucker [MVP]: "Re: Excel File Format of ".CVS""
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 17 Aug 2004 16:23:02 -0600
I have a form containing a panel and a picturebox inside the panel.
The form load code changes the panel size to 400x400 and the picturebox size
to 800x800
Autoscroll on the panel is set to true.
The picturebox sizemode is set to AutoSize and StretchImage
An image of size 400x400 is loadeded into the picturebox.
Everything works as expected.
I have also added the following code (see end of message).
The pagedown does shift the visible portion of the image in the picturebox
down as I want it to.
However, the bottom part of the vertical scrollbar on the right side of the
panel moves down correctly, but the top part of the scrollbar stays frozen
in place. This just makes the scrollbar appear too long and makes it
unusable for scrolling back to the top.
I'll be happy to email code if this question isn't clear.
Thanks in advance for any help.
Ron Dahl
Protected Overrides Function ProcessCmdKey(ByRef msg As
System.Windows.Forms.Message, _
ByVal keyData As System.Windows.Forms.Keys) As Boolean
Select Case keyData
Case Keys.PageUp
MyY += 50
Me.PictureBox1.Location = New Point(MyX, MyY)
Me.PictureBox1.Refresh()
Case Keys.PageDown
MyY -= 50
Me.PictureBox1.Location = New Point(MyX, MyY)
Me.PictureBox1.Refresh()
End Select
End Function
- Next message: Alejandra Parra: "doubt...?"
- Previous message: Ken Tucker [MVP]: "Re: Excel File Format of ".CVS""
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|