Welcome to Dream.In.Code
Become a VB Expert!

Join 150,134 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 2,196 people online right now. Registration is fast and FREE... Join Now!




Top of form

 
Reply to this topicStart new topic

Top of form, how to push button to go to top of long form

Steve Too
22 Jul, 2008 - 04:29 AM
Post #1

New D.I.C Head
*

Joined: 22 Jul, 2008
Posts: 2

If I knew the code for this I wouldn't be asking! smile.gif
User is offlineProfile CardPM
+Quote Post

Zhalix
RE: Top Of Form
22 Jul, 2008 - 04:51 AM
Post #2

D.I.C Head
**

Joined: 7 May, 2008
Posts: 218



Thanked: 9 times
My Contributions
What do you mean? Is your form so tall that it doesn't fit on the screen?
User is offlineProfile CardPM
+Quote Post

Steve Too
RE: Top Of Form
22 Jul, 2008 - 05:01 AM
Post #3

New D.I.C Head
*

Joined: 22 Jul, 2008
Posts: 2

QUOTE(Steve Too @ 22 Jul, 2008 - 05:29 AM) *

If I knew the code for this I wouldn't be asking! smile.gif


Yes! I have a scroll bar on it but when they get to the end of the form(bottom) I want to put a button to " go to top of form" similar to how web pages ust go to top.
User is offlineProfile CardPM
+Quote Post

Zhalix
RE: Top Of Form
22 Jul, 2008 - 05:28 AM
Post #4

D.I.C Head
**

Joined: 7 May, 2008
Posts: 218



Thanked: 9 times
My Contributions
Well assuming you're using VB 6, and assuming you're using the Vertical Scrollbar control that's default on the toolbox, then all your button would have to do is set the scrollbar's value to 0 and then either use the calculating process you're using to move the controls on the form up and down based off of the scrollbar, or simply tell all the controls to be set to their original locations by individually setting their Top property.

This post has been edited by Zhalix: 22 Jul, 2008 - 05:29 AM
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/9/09 01:51AM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live VB Help!

VB Tutorials

Reference Sheets

VB Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month