473,782 Members | 2,396 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

VScrollBar key events for scrolling

I'm using the System.Windows. Forms.VScrollBa r on my form.
I'm handling VScrollBar Scroll event.

I want to handle the Up, Down, PageUp PageDown keys for this VScrollBar,
but when I register to the keyDown and KeyPress events, it never gets there.
So I also handled the key events of the form and from there I forwarded the
event to the VScrollBar corresponding event, but still the VScrollBar events
in never invoked.

What should I do so I'll be able to scroll my VScrollBar by using the
Up/Down/PageUp/PageDown ?

--
Thanks
Sharon
Jul 1 '07 #1
1 2399

"Sharon" <Sh*****@newsgr oups.nospamwrot e in message
news:0B******** *************** ***********@mic rosoft.com...
I'm using the System.Windows. Forms.VScrollBa r on my form.
I'm handling VScrollBar Scroll event.

I want to handle the Up, Down, PageUp PageDown keys for this VScrollBar,
but when I register to the keyDown and KeyPress events, it never gets
there.
So I also handled the key events of the form and from there I forwarded
the
event to the VScrollBar corresponding event, but still the VScrollBar
events
in never invoked.

What should I do so I'll be able to scroll my VScrollBar by using the
Up/Down/PageUp/PageDown ?
I did get that to work for a hot minute in an example I had put together.
But it was a hot minute. I had a Messagebox in the Keydown event for the
scrollbar. And then I hit some keys and the messagebox showed each time. I
have some other controls on the form. It seems that VSB needs to have some
kind of focus for this to work, which I got it to work the first time. It
hasn't worked since. I don't know what the deal is with it now. :(

Jul 1 '07 #2

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

Similar topics

0
1133
by: Gawelek | last post by:
I would like to "cheat" VScrollBar in DataGrid. That means I want to link for example DataTable with 50 rows to DataGrid. But I want, that VScrollBar looks as if DataTable contains for example 100 or 1000 rows. Is it possible to do ? I tried by Maximum properties, but it seems not to work. Gawel
1
5160
by: Dmitri Shvetsov | last post by:
Hi All, Did somebody play with vScrollBar in C#? I've got a small trouble. When I assign the Maximum value and try to move the slider of the vScrollBar to a maximum position I can't get the maximum value from a vScrollBar.Value. I can assume that to correct this problem is easy. I'm sure that's it's a bug, the developers didn't think about the width of the slider and this width is excluded from the vScrollBar total length, so we're...
0
1126
by: meicher | last post by:
Hi, I have an application with forms. Every form includes a VScrollBar and a HScrollBar. The ScrollBars allways get the arrow keys and start blinking ? How can I catch these key events ? KeyUp, KeyDown, KeyPress, Handled = true, KeyPreview = true, ProcessKeyMessage etc. don't help. :( Regards mike
2
1984
by: Hans [DiaGraphIT] | last post by:
Hi! In a windowsapplication i have a datagrid where I dont want the vertical scrollbar to be visible. I can't find HorizontalScrollBar and VerticalScrollBar properties anywhere. I've tried to create controls for this... without luck. Here is the code I'm using. Please tell me what I'm doing wrong. this.InitializeScrollBar(DataGrid1)
4
8137
by: Sharon | last post by:
I have a ListBox on my form and wand to do auto scrolling, I can do that by: myListBox.ClearSelected(); OutputListBox.SelectedIndex = myListBox.Items.Count - 1; But it causes to unselect all selected items, so I wish do that by moving the vertical scroll bar, imbedded in the ListBox. But I couldn’t find a way to get the ListBox vertical scroll bar. Can anybody show how to obtain it and how to make move/scroll?? --
0
1271
by: bleedledeep | last post by:
I have a DataGrid that ends up with a VScrollBar due to the number of rows, and the behavior I want is for the bottom-most row of the DataGrid to be shown, i.e., I want the VScrollBar all the way to the bottom (maximum). I grab and set the VScrollBar using the following: if ( historyDataGrid.Controls is VScrollBar ) { VScrollBar vsb = (VScrollBar)historyDataGrid.Controls;
2
6019
by: Sascha Schmidt | last post by:
Hello ! I'm trying to combine an external (not part of the panel) vertical scrollbar (VScrollBar) with a panel in order to scroll the content of the panel vertically using the external VScrollbar. I can't set the "AutoScroll"-property to true and then use the generated scrollbars inside the panel, because i have to use this external scrollbar which is a modified/customized scrollbar, and doesn't look like a standard scrollbar.
0
1102
by: Longkhi | last post by:
Hi everybody. I have quite a problem with the vscrollbar component. The control I'm using has a built-in scrollbar, but I have 5 of those controls, and I would like to bind the external vscrollbar to scroll them all synchronically. I have tried several other methods such as the wndProc override method. It didn't work, so I'm trying this alternative method.
1
1742
by: eBob.com | last post by:
I have two apps, both developed using the same VBE, and both having a VScrollBar, but the two VScrollBars have very different styles. (In the screen shot, which I had hoped to attach but can't, one appears on the left and the other appears on the right. But, even without the screen shot, referring to the two cases as the "left case" and the "right case" seems to make as much sense as any other way of distinguishing the two cases. So...
0
10146
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
10080
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
8967
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...
1
7492
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5378
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5509
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4043
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
2
3639
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2874
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.