473,396 Members | 1,982 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,396 software developers and data experts.

.Net Compact - Scroll bars on forms Solution

markmcgookin
648 Expert 512MB
hi Folks,

Just posting this as a solution to be honest (hope this is the right place)

I created a form for PPC 2003 using VB.Net compact Framework

One of my forms is longer than the screen, and the Autoscroll function that is on VB.Net is not supported by the compact framework (shocking.. I know!)

But I figured out how to do it (however, the MSDN solution doesnt cater for any kind of relatively hi res device, hence the extra bit of code to increase the output value of the bar!)

Drag your form down (not HZ, same principles apply, but this code is for the Vscrollbar not Hscrollbar!) unil it is as long as you like.

Then create a Panel (from toolbar) and make it the exact same size

add all your components etc into this panel and add a scrollbar the full length of the panel/form

then double click it to create a valuechanged event and use this code!

Expand|Select|Wrap|Line Numbers
  1.  
  2.     Private Sub VScrollBar1_ValueChanged_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles VScrollBar1.ValueChanged
  3.         Dim scrollVal As Double
  4.         scrollVal = Me.VScrollBar1.Value * 3
  5.         Me.Panel1.Top = -scrollVal
  6.     End Sub
  7.  
  8.  
Hope this helps someone else out, as it was really frustrating for me!
Mar 11 '07 #1
1 1829
willakawill
1,646 1GB
Hey thanks for posting this solution.
Mar 15 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

12
by: Arlie Rahn | last post by:
I would like to ad a custom scroll bar control to my app that has a customizable and "flat" look to it (not the normal VB look). Does anyone have any ideas on where to find a good one?
4
by: justdummy | last post by:
Hi, I am struggling with a problem for sometimes. I need to display a table in a html and if the height of the table goes beyond 200 px then a vertical scrollbar should alone appear without any...
2
by: Paradigm | last post by:
I have a number of text boxes on a number of forms and I cannot get the scroll bars to display. The text boxes have the scrollbars property set to vertical. I can use the cursor keys to scroll up...
3
by: Benny Raymond | last post by:
I've looked around msdn for about an hour now and can't figure out how to place an event when the user scrolls, or even how to get the value of where the scroll bar is actually placed... Anyone...
1
by: edi sol | last post by:
Hi, I am writing a hex edit control from a UserControl. I use drawtext method of the graphics object in the OnPaint. When the text which I draw go out of the visible rectangle of the control I...
7
by: Sharon | last post by:
I’m using the Panel control that contains a PictureBox control (for implementing the http://www.codeproject.com/cs/miscctrl/PictureBox.asp). The Panel is set to AutoScroll = true. I wish to...
2
by: usenet | last post by:
When I open a form design window in Access 2003 it *always* has scroll bars, this is even when the form itself is tiny. It's as if the 'page' on which the form is being designed is very large. ...
1
by: David_from_Chicago | last post by:
I am developing an application in Access 2000 (A2K) which has multiple forms and subforms. Until now, all subforms displayed scroll bars properly (according to the subform's property setting). ...
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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.