Solved

Add scrobar to listbox

Posted on 1998-10-04
4
195 Views
Last Modified: 2013-12-25
How do you add a horizontal scallbar to a list box?
0
Comment
Question by:wallacjb
  • 2
  • 2
4 Comments
 
LVL 9

Accepted Solution

by:
Dalin earned 250 total points
ID: 1487316
Wallacjb,
Try this: If you have questions, let me know.
Regards
Dalin


1. API Declare

     Const LB_SETHORIZONTALEXTENT = &H194
     Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam  As Long, lParam As Any) As Long

2. When you want add the scrollbar, add

        
   Call SendMessage(List1.hwnd, LB_SETHORIZONTALEXTENT, widthofScrollbar, ByVal 0&)

    ' width is in pixel
0
 

Author Comment

by:wallacjb
ID: 1487317
How to get widthofScrollbar?
0
 
LVL 9

Expert Comment

by:Dalin
ID: 1487318
Sorry.  I should have added it to my bank. This happed before.

scwidth = List1.Width / Screen.TwipsPerPixelX
0
 

Author Comment

by:wallacjb
ID: 1487319
Thanks.
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question