1

I have a panel which has a vertical scroll bar on it. Inside the panel are several DataGridViews. When I use the application on a touch screen such as the Lenovo ThinkPad, I'd like to be able to move the whole panel up or down by sliding my finger up and down the screen. However, this doesn't happen. If I touch the screen, I can select an individual row on a data grid. Or if I touch the slider on the side, I can make the screen move up and down just as if I was using a mouse, but apart from that, I can't make the panel move.

If I use my browser, and the page is larger than the screen, then I can use my finger to slide the entire page up and down. I realize that this is a browser and not a Windows forms application, but that is the functionality that I need.

My app is a Windows Forms application. Thanks.

John
  • 1,310
  • 3
  • 32
  • 58
  • See if anything in this question will help you (it's in C#, but should not be too hard to convert): http://stackoverflow.com/questions/6963498/how-to-get-smartphone-like-scrolling-for-a-winforms-touchscreen-app-scrolling – Visual Vincent Mar 07 '16 at 23:59

2 Answers2

0

You could make a new form, turn AutoScroll on there and stretch it to the width of your choice.

Then in your other form your simply add it as control in your panel. Example (Form1 = Main Form, Form2 = AutoScroll Form, Panel1 = Your Panel):

Sub Form1_Load(...) Handles MyBase.Load
      Dim ScrollFrm As New Form2()
      ScrollFrm.TopLevel = False
      Panel1.Controls.Add(ScrollFrm)
      ScrollFrm.Dock = DockStyle.Fill
      ScrollFrm.Show()
End Sub

Hope that helps :)

Jonas
  • 1
  • 1
  • I don't see how this will help him perform scrolling with his finger... Also, docking the form will make it adjust to the panel's size. – Visual Vincent Mar 07 '16 at 23:57
  • It doesn't but thanks for the comment. I ended up using the information in another question to solve my problem. The other question was at this link: http://stackoverflow.com/questions/6963498/how-to-get-smartphone-like-scrolling-for-a-winforms-touchscreen-app-scrolling – John Mar 08 '16 at 14:37
0

I ended up using this link to put my answer together. I had to make a few slight modifications to suit my needs, but the basic idea was the same.

how to get smartphone like scrolling for a winforms touchscreen app ( scrolling panel )

Community
  • 1
  • 1
John
  • 1,310
  • 3
  • 32
  • 58