Desktop Functions: Smart Device Functions:
|
getscrollbarinfo (user32)
C# Signature:
[DllImport( "user32.dll", SetLastError=true, EntryPoint="GetScrollBarInfo")] User-Defined Types:
[StructLayout(LayoutKind.Sequential)] Notes:This didn't work for me with the Rectangle type for SCROLLBARINFO.rcScrollBar. To rectify this I altered this declaration to type RECT using the following standard definition.
public struct RECT This then worked for me! Tips & Tricks:for idObject, use one of these values (see the MSDN link at the bottom for their usage):
private const uint OBJID_HSCROLL = 0xFFFFFFFA; Sample Code:
SCROLLBARINFO psbi = new SCROLLBARINFO(); probably Marshal.GetLastWin32Error() is better here Alternative Managed API:if you have a reference to a System.Windows.Forms.ScrollBar, use it's properties. otherwise,
SystemInformation.HorizontalScrollbar* and
SystemInformation.VerticalScrollbar* can give you some of the data. http://msdn2.microsoft.com/en-us/library/ms651286.aspx Please edit this page!Do you have...
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more). |
|