473,491 Members | 2,205 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Scrolling a form to a particular point...

I have a long VB.NET form with a scrollbar (autoscroll=true, not an actual
scrollbar control).
In response to one particular buttonclick, I need to scroll down to a
particular point on the form, and I can't figure out how to do it! Nothing I
try seems to work.

Just in case it matters, it is a maximized child window of an MDI parent
application.

Thanks for your help!
Nov 20 '05 #1
2 1498
* "BradC" <br********@yahoo.com> scripsit:
I have a long VB.NET form with a scrollbar (autoscroll=true, not an actual
scrollbar control).
In response to one particular buttonclick, I need to scroll down to a
particular point on the form, and I can't figure out how to do it! Nothing I
try seems to work.


Set the form's 'AutoScrollPosition' property.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #2
Thanks. That does move it, but it doesn't seem to move it to the right
place.

Let me give an example:
My form totals about 1000 pixels tall.
I have a panel starting about y=500 that I want to appear at the TOP of the
window.
(So I want to see from 500 to however tall their window size is).

If I try to set .AutoScrollPosition = New Point(0, 500),
it scoots down just a tiny bit so your viewing from, say, 100 to 600.
If I click the same button again, THEN it scoots down further so you can see
the entire panel.

Is my syntax correct?
Thanks
BradC

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:bu************@ID-208219.news.uni-berlin.de...
* "BradC" <br********@yahoo.com> scripsit:
I have a long VB.NET form with a scrollbar (autoscroll=true, not an actual scrollbar control).
In response to one particular buttonclick, I need to scroll down to a
particular point on the form, and I can't figure out how to do it! Nothing I try seems to work.


Set the form's 'AutoScrollPosition' property.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>

Nov 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3578
by: Wesman | last post by:
Threads, textboxes and scrolling Thanks in advance for any information on this matter. I have run into a small richtextbox, scrolling and tread issue. Which has me totally confused. Instead of...
2
3819
by: James CC | last post by:
I have a strange bug in C# using windows forms. To make sure it's not some bug with my code, I've gone back to a simple test app, and still see the same behavior. I have created a simple C#...
0
2210
by: 23s | last post by:
Is there any way I can send a vertical value to a form's scroll position? I have a full-screen form that, at launch, contains an empty tab sheet. At run time, the user can dynamically append a...
1
2343
by: Oberfuhrer | last post by:
Hello all VB.net friends ! i have done most of my programming in assembly, at least so far. Recently i decided to learn a high level language for windows programming. I didnt take long to...
1
1840
by: atif | last post by:
Hi, I m new to CSharp.. so may be my preliminary questions look stupid.. but plz help me.. I want to drag controls like buttons or some other user controls over form.. i have set form's...
4
4346
by: iKiLL | last post by:
Hi All I am Developing in C# with VS2005. I am Developing a Windows Mobile Forms Application with the CF2 My problem is that when the Input panel is displayed my screen does not
11
7589
by: =?Utf-8?B?UmF5IE1pdGNoZWxs?= | last post by:
Hello, I know I sound like a one-note Johnny on this but I'm still looking for a solution. I need to display characters coming in from a serial port or a socket. I also need to be able to type...
1
4414
by: =?Utf-8?B?R2lkaQ==?= | last post by:
Hi, I've panel in my windows form, and i want to get the exact mouse position when i double click. I used: Point p = this.panel1.PointToClient(Cursor.Position); but now, if i'm pointing on...
7
5724
by: Kevin Wilcox | last post by:
Hi I'm trying to emulate, within access, the gantt chart timeline / task planner aspects of ms project. Creating the chart on the form has been easy enough; I use a series of unbound text boxes in...
0
7115
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,...
0
6978
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
7190
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...
1
6858
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
7360
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...
0
5451
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,...
0
1392
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
633
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
280
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...

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.