Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Add scrobar to listbox

Posted on 1998-10-04
4
Medium Priority
?
201 Views
Last Modified: 2013-12-25
How do you add a horizontal scallbar to a list box?
0
Comment
Question by:wallacjb
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 9

Accepted Solution

by:
Dalin earned 1000 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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…
Suggested Courses

610 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