Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Forms Scrolling
Greetings,
 
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    VScrollBar1.Maximum = (Panel1.Height - Me.Height) + 500
    VScrollBar1.SmallChange = 50
    VScrollBar1.LargeChange = 100
End Sub
Private Sub VScroll1_Change()
    Panel1.Top = 0 - VScrollBar1.Value
End Sub
 
I tried this code, but doesn't seem to work, any help to get here ? Smile | :)
 
What i want is to scroll through my Form, maybe a Panel isn't the right way to do it, or maybe i'm using a Wrong Code ?
 
Visual Studio 2010 Smile | :)
Posted 24-Sep-12 2:38am
fRodzet354
Edited 24-Sep-12 2:40am
v2
Comments
Vijay Walunj,Navi mumbai at 24-Sep-12 7:44am
   
if possible provide detail code.i think you want call function on onscroll event of panel.you can do this by calling javascript function on onscoll event and set panelId.onscrolltop(value).
OriginalGriff at 24-Sep-12 7:57am
   
What are you actually trying to achieve? Because I am fairly sure that isn't the way to do it, but I can't work out what you are trying to do!
fRodzet at 24-Sep-12 8:13am
   
I'm trying to creat a Vertical scroll for my Form. so that i can, just like on this site, scroll up and down through my Form. I read that code @ another forum. But doesn't seem to work.

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Okay so i t couldn't be any more easy than this.
 
I just set AutoScroll to True @ the form and it works like a charm now.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 575
1 Kornfeld Eliyahu Peter 409
2 Maciej Los 369
3 DamithSL 196
4 OriginalGriff 188
0 OriginalGriff 6,353
1 DamithSL 4,854
2 Maciej Los 4,466
3 Kornfeld Eliyahu Peter 4,058
4 Sergey Alexandrovich Kryukov 3,897


Advertise | Privacy | Mobile
Web01 | 2.8.141220.1 | Last Updated 24 Sep 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100