?
Solved

hscrollbars with listbox with checkbox property enabled

Posted on 2005-02-28
2
Medium Priority
?
294 Views
Last Modified: 2010-05-18
Is it possible to have a horizontal scroll baR with the check box style enabled???
0
Comment
Question by:keboone
[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 Comments
 
LVL 2

Expert Comment

by:elmer88techteam
ID: 13427034
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
Const LB_SETHORIZONTALEXTENT = &H194

' Set the horizontal extent of the control (in pixel).
' If this value is greater than the current control's width
' an horizontal scrollbar appears.

Sub SetHorizontalExtent(lb As ListBox, ByVal newWidth As Long)
    SendMessage lb.hwnd, LB_SETHORIZONTALEXTENT, newWidth, ByVal 0&
End Sub

'The LB_GETHORIZONTALEXTENT message is useful to retrieve the current value of the horizontal extent:

'Const LB_GETHORIZONTALEXTENT = &H193

' Return the horizontal extent of the control (in pixel).

Function GetHorizontalExtent(lb As ListBox) As Long
    GetHorizontalExtent = SendMessage(lb.hwnd, LB_GETHORIZONTALEXTENT, 0, _
        ByVal 0&)
End Function

---------------------------------------------

'Example:

Private Sub Form_Load()
SetHorizontalExtent List1, 200
End Sub
0
 
LVL 2

Accepted Solution

by:
elmer88techteam earned 375 total points
ID: 13427050
forgot to acknowledge...

source from http://www.devx.com/vb2themax/Tip/18591
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In this post we will learn different types of Android Layout and some basics of an Android App.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Suggested Courses

801 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