Quantcast
Channel: Windows Forms General forum
Viewing all articles
Browse latest Browse all 12583

How to determine if the horizontal scrollbar is visible in a listview control using c#

$
0
0

I am having difficulty trying to determine whether the horizontal scrollbar is visible in the listview control.

I have tried using:

foreach(c in Listview1.Controls)
               If (c.GetType() Is GetType(VScrollBar))
                    Return c.Visible 

but Listview1.Controls doesn't contain any controls (my listview is ownerdrawn)

I also tried GetWindowLong using [DllImport("coredll.dll")]

but I end up having an exception: 

Unable to load DLL 'coredll.dll': The specified module could not be found.

Could any one help me? I'm kinda lost right now

Thanks in advance.



Viewing all articles
Browse latest Browse all 12583

Trending Articles