473,387 Members | 1,464 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Scrollbar Question

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
Nov 21 '05 #1
0 1010

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

Similar topics

7
by: Marion | last post by:
Hello. I am using Tkinter and Pmw. I would like to build 2 canvases/frames that are scrollable together horizontally, and independently vertically (so, the vertical scrollbars should not be...
3
by: buht | last post by:
Hello Everyone, Fairly new to c# here and have a question regarding scrollbars, particularly a vertical scrollbar. It looks like my options are restricted for the textbox scrollbars being...
1
by: dhnriverside | last post by:
Hi guys I'm using a div to create a list with ajax stuff. At the moment, the div shows a scrollbar if the content is larger than the div. The problem is that if it isnt, the scrollbar...
0
by: Antony | last post by:
Hi - another scrollbar question. If I have a control on a form, and that control has scrollbars showing, and the scrollbars were put there by the control and not by me, how do I get the...
22
by: Colin McGuire | last post by:
I apologize for posting yet another scrollbar question. Here is my code. All I want is for a diagonal line to appear from coordinates (0,0) to (width,height) in a usercontrol regardless of whether...
14
by: Michael Weis | last post by:
Hello all, as a non-professional in these things, I searched for this topic but found no satisfying answer: I have to create a site with 3 frames. (Please no diskussion about the sense of...
1
by: Mae Lim | last post by:
Hi all, I have a question, how can I add an horizontal scrollbar to a listbox control? I have tried "overflow:scroll;" using <divbut the scrollbar will be display outside of the listbox. I...
4
by: Peter Oliphant | last post by:
Although the ScrollBar class has BackColor and ForeColor properties, these properties don't seem to have any effect. Is this correct? If so, is it possible to change the color of a ScrollBar?
3
by: Nebulism | last post by:
Hi everyone, I am working on a module for my GUI that shows one image with an index value below and would use a scrollbar to control which of the images are displayed. The images are stored in a...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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...

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.