473,385 Members | 1,983 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

How to force list control always have scroll bar?

Is there simple way to force list control always have scroll bar, even if the
list control is not full?

Thanks
Nov 17 '05 #1
2 1438
Hi Steeve!

you can call the ShowScrollBar API :
'***
Private Const SB_HORZ As Int32 = 0
Private Const SB_VERT As Int32 = 1
Private Const SB_CTL As Int32 = 2
Private Const SB_BOTH As Int32 = 3

'BOOL ShowScrollBar(
' HWND hWnd,
' int wBar,
' BOOL(bShow)
<DllImport("user32.dll")> _
Private Shared Function ShowScrollBar _
( _
ByVal hWnd As IntPtr, _
ByVal wBar As Int32, _
ByVal bShow As Boolean) As Boolean
'
End Function

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
' show the both scrollbar
ShowScrollBar(ListBox1.Handle, SB_BOTH, True)
End Sub
'***
--
Best Regards
Yanick
"Steve" <St***@discussions.microsoft.com> a écrit dans le message de
news:F5**********************************@microsof t.com...
Is there simple way to force list control always have scroll bar, even if the list control is not full?

Thanks

Nov 17 '05 #2
dooo! wrong group...

the technic should work in C++ though... I just got no idea about the syntax
you have too use.

--
Best Regards
Yanick
Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Ray | last post by:
DB2 V7.2 Is it possible to list applications connected to a node by Auth ID? Is it possible to force applications connected to a node by Auth ID or am I forced to use App. Handle? Thanks, Ray
6
by: Danny Lesandrini | last post by:
I'm using an Access database to drive a web site and the colors of various table backgrounds are stored in Access. I want users of the Access database to be able to select colors for the site, but...
3
by: Raymond Dynowski | last post by:
How do you force a panel to scroll in code. I have a large picture box inside my panel. I would like the panel to default to the centre of the screen, rather than the scrollbars showing the top...
3
by: Steve | last post by:
I want to force a window to scroll and am finding this to be an impossibly difficult task. First I tried using the API functions ScrollWindow and ScrollWindowEx but they do not work. The portion...
1
by: Steve | last post by:
I have application which displays dialog containing CListCtrl control. The OnTimer message handler updates values in this list control. In case if there are more items then visible area of list...
8
by: (PeteCresswell) | last post by:
I've got a TreeView in which I present a rather wide line of info for some branches. The user doesn't care to see all the info all of the time and we're tight on horizontal screen space, so we've...
24
by: tizi_de | last post by:
Hello all, I'm looking for a sample program in C to print out lines not to the standard MS Dos Box but into a different control e.g. text control. Has C the possibility to do printouts to a...
4
by: AAaron123 | last post by:
<body runat="server" id="MainBody"> <form id="form1" runat="server" style="background-color:green; width: 100%; height: 100%"> <br /> Table1" runat="server" Style="background-color:Yellow;...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.