Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Scrollbars & Forms

Status
Not open for further replies.

Viruland

Programmer
Dec 6, 2000
61
BE
Hi there,
I've got a form with a height that is greater than the screen height. I have placed a vertical scrollbar on the form for scrolling the form on my screen. The problem is that I don't have a clue how to program the scrollbar.
Is there anyone out there that can help me?

Thx Live fast, die young and leave a beautiful corpse behind.
 
Put all the controls of your form on a frame, the frame
size needs to the size of the form.
place the scrollbar next to the frame,
and when you scroll down move the frame top downwards,
so you'll see the frame(container) will rise upwards with
all of it's controls in it.
in the scrollbar_change sub write this:
frame1.top=-scrollbar1.value
 
I want to correct something,
the frame1.top should be 0 on the form.
the scrollbar will start from 0 so any change
to it, it will affect frame1.top accordingly.
hope it helps
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top