473,672 Members | 2,641 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

.Net Compact - Scroll bars on forms Solution

markmcgookin
648 Recognized Expert Contributor
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 1838
willakawill
1,646 Top Contributor
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
12728
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
134385
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 horizontal scroll bar. If the height of the table is less than 200 px then no scroll bars should appear. Here is the html below. I tried to wrap the table around a <div> tag but its doesn't work out as the scroll bar appear close to the scroll bar...
2
2366
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 and down but I cannot get the scroll bars to display. Has anyone seen this before and is there a fix. thanks in advance Alex
3
14714
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 know how to use this event, or how to get the scroll bar info? ~Benny
1
6285
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 want to create scrollbars but they don't appear - I set autoscroll to true and autoscrollmargin to (5,5). If I add a button or other controls the scrollbars are working. What can I do and what is my mistake?
7
18189
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 scroll the appearing vertical and horizontal scrolls bars of the Panel to the middle of their scrolling range so the contained PictureBox will be centered inside the Panel. But I could not find a way to get the scrolls bars for doing that.
2
2220
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. Is this normal? If so it's very annoying and confusing. If not then how do I get it so my form design window doesn't have scroll bars. -- Chris Green
1
2406
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). However, a new subform control will not display horizontal scroll bars despite it's form's property setting. I have tried deleting and recreating both the subform control and the subform itself thinking this would address the issue. I also tried...
0
8488
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8408
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8932
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8832
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8611
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7449
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4421
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2067
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1819
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.