PC Review


Reply
Thread Tools Rate Thread

c# - listBox onScroll event

 
 
John Keers
Guest
Posts: n/a
 
      27th Oct 2005
Can anyone tell me how to fire and use a listBox onScroll event. The
language I am using is C# in a windows forms application

thanks


 
Reply With Quote
 
 
 
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      27th Oct 2005
"John Keers" <(E-Mail Removed)> schrieb:
> Can anyone tell me how to fire and use a listBox onScroll event. The
> language I am using is C# in a windows forms application


<URL:http://groups.google.de/groups?q=WM_VSCROLL+csharp+listbox>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
 
Reply With Quote
 
 
 
 
[MSFT]
Guest
Posts: n/a
 
      28th Oct 2005
Hi John,


ListBox doesnot provide a interface for your to manipulate the scrollbar
directly. As a workaround, you can try sending WM_VSCROLL message via
PInvoke. For
example:


Class Win32
{
[DllImport("User32.Dll")]
public static extern bool SendMessage(IntPtr hWnd,int Msg,int
wParam,int lParam);
public const int WM_VSCROLL = 0x0115;
public const int SB_LINEDOWN = 1;



}


Win32.SendMessage(listBox1.Handle,Win32.WM_VSCROLL,Win32.SB_LINEDOWN,0);

Hope this helps.


Regards,

Luke


 
Reply With Quote
 
New Member
Join Date: Jun 2011
Posts: 1
 
      18th Jun 2011
Quote:
Originally Posted by Herfried K. Wagner [MVP] View Post
"John Keers" <(E-Mail Removed)> schrieb:
> Can anyone tell me how to fire and use a listBox onScroll event. The
> language I am using is C# in a windows forms application


<URL:http://groups.google.de/groups?q=WM_VSCROLL+csharp+listbox>
Googling "listbox onscroll", this thread is the third hit in the list. Your post linking to google is about as helpful as tits on a bull. Let's assume everyone was a giant douchenozzle like yourself, and in reply to every question simply posted a link to google... we'd have a results list of google search links. Congratulations on contributing to useless recursion.

Quote:
Originally Posted by [MSFT] View Post
Hi John,


ListBox doesnot provide a interface for your to manipulate the scrollbar
directly. As a workaround, you can try sending WM_VSCROLL message via
PInvoke. For
example:


Class Win32
{
[DllImport("User32.Dll")]
public static extern bool SendMessage(IntPtr hWnd,int Msg,int
wParam,int lParam);
public const int WM_VSCROLL = 0x0115;
public const int SB_LINEDOWN = 1;



}


Win32.SendMessage(listBox1.Handle,Win32.WM_VSCROLL,Win32.SB_LINEDOWN,0);

Hope this helps.


Regards,

Luke
Thanks, Luke. This is the sort of information which someone who DOES search for a particular topic expects to find.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
onscroll Event Not Firing in ASP.NET 2.0 Sam Microsoft ASP .NET 2 29th Sep 2006 04:25 AM
handling onscroll event of WebBrowser (repost) Jocker Microsoft C# .NET 0 18th Aug 2006 05:28 PM
handling onscroll event of WebBrowser Jocker Microsoft C# .NET 0 7th Aug 2006 02:48 PM
c# - listbox onScroll event John Keers Microsoft Dot NET 1 28th Oct 2005 04:02 AM
Scroll bars in treeview - how can you get onscroll as well as theirposition? Benny Raymond Microsoft C# .NET 3 16th Feb 2005 10:57 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:04 PM.