Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / Win API / February 2007



Tip: Looking for answers? Try searching our database.

ScrollWindowEx and WM_VSCROLL for a ListBox control

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
evan - 28 Feb 2007 06:49 GMT
Hi,

Is anyone able to give me an example on how to scroll the contents of
a ListBox without forcing the user to click on the scroll up/down
internal buttons?

==============================
I am wanting to draw my own non-client area (including the scrollbar).
I have had the following ideas but each idea has failed:

1) Turn off the scrollbar using the "ShowScrollBar" API
    -> Turns off the scrollbar but no scrollbar functionality (for
mousescroll etc.)...
    -> Requires manually scrolling the Listbox contents

2) Use WndProc to override WM_NCPAINT
    -> The scrollbar and its buttons are still painted whenever the
user clicks on it (WM_NCPAINT is not fired)
    -> It is likely that the paint is occurring within the
WM_NCLBUTTONDOWN event
    -> Will have to override WM_NCLBUTTONDOWN

3) Use WndProc to override WM_VSCROLL
    -> Not able to scroll contents (what actually happens in
WM_SCROLL? I am assuming it calls ScrollWindowEx)
==============================

It would be most logical to handle the WM_NCPAINT and WM_NCLBUTTONDOWN
events so that there is no redraw of the scrollbar and then fire my
own WM_VSCROLL event.... then handle my own scrollbar and scrolling
routines.

Either way... does anyone please have an example of how to use
ScrollWindowEx in VB .Net???

/evan
Jim Mack - 28 Feb 2007 12:05 GMT
> Either way... does anyone please have an example of how to use
> ScrollWindowEx in VB .Net???

.NET questions are off-topic in this group, which is for VB6 and earlier.

You'll get better help in a group with 'dotnet' in its name.
evan - 28 Feb 2007 23:49 GMT
> > Either way... does anyone please have an example of how to use
> > ScrollWindowEx in VB .Net???
>
>  .NET questions are off-topic in this group, which is for VB6 and earlier.
>
> You'll get better help in a group with 'dotnet' in its name.

Thanks for the 'heads up'

/evan
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.