473,549 Members | 2,651 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Scrolling a form to a particular point...

I have a long VB.NET form with a scrollbar (autoscroll=tru e, 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 1502
* "BradC" <br********@yah oo.com> scripsit:
I have a long VB.NET form with a scrollbar (autoscroll=tru e, 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 'AutoScrollPosi tion' 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 .AutoScrollPosi tion = 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********@yah oo.com> scripsit:
I have a long VB.NET form with a scrollbar (autoscroll=tru e, 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 'AutoScrollPosi tion' 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
3596
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 trying to explain it I wrote some small C# code to demonstrate the fact that in the threaded version the textbox simple doesn't scroll like it...
2
3824
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# Windows MDI Application, as in MSDN, ie : 1) Create Windows Application (Form1), set IsMDIContainer to true 2) Create MainMenu component in the form,...
0
2232
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 rich textbox to the tab sheet. The rich textbox is placed at 0,0 (upper left corner) within the tab sheet and is initially 1 "line" tall to...
1
2349
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 realize that VB.net would be my perfect friend. I have already rewritten most of my assembly controls in VB, but i am not satiesfied with the scrolling...
1
1844
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 autoscroll = true to handle scrolling automatically. but when i drag the components of form, scrolling occurs extra ordinary too fast.. so plz help me...
4
4359
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
7593
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 characters into the display myself - but that's not the main issue at this time. I've tried a scrolling multiline text box but once the original...
1
4420
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 the top-left corner of the panel i get the cordinates (0,0), and then, i'm scrolling with the mouse whell, and then i double click again, on the same...
7
5740
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 the header to show the week numbers, with correlating unbound text boxes in the detail section of a continuous form to calculate a series of values...
0
7730
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. ...
0
7975
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...
1
7492
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...
1
5381
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3510
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3491
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1957
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 we have to send another system
1
1069
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
777
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...

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.