Results 1 to 4 of 4

Thread: [*resolved]Help me get system scrollbar's width

  1. #1

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428

    Unhappy [*resolved]Help me get system scrollbar's width

    I need to find out the width of a system scroll bar (you know that this changes if you have different themes/styles on your computer).
    So for example I need to know how wide is a vertical scroll bar.I have this GetScrollInfo API, dunno if I should use it or not.
    VB Code:
    1. <StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Auto)> _
    2.     Private Structure SCROLLINFO
    3.         Public cbSize As Integer
    4.         Public fMask As Integer
    5.         Public nMin As Integer
    6.         Public nMax As Integer
    7.         Public nPage As Integer
    8.         Public nPos As Integer
    9.         Public nTrackPos As Integer
    10.     End Structure
    11.  
    12.     <DllImport("user32.dll", CharSet:=CharSet.Auto)> _
    13.     Private Function GetScrollInfo(ByVal hwnd As IntPtr, ByVal bar As Integer, ByRef si As SCROLLINFO) As Integer
    14.     End Function
    any help appriciated!
    Last edited by MrPolite; Feb 3rd, 2003 at 07:46 PM.
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  2. #2
    Hyperactive Member RealNickyDude's Avatar
    Join Date
    Nov 2002
    Location
    Watching you through the hidden camera :o
    Posts
    435
    I'm sorry I can't help, but if you do find the answer, could you possibly send it my way to include in the VBCodeBook CodePack update?

    [vbcode]
    On Error GoTo Hell
    [/vbcode]:¬) Nicky : Why not try VBCodebook.NET.

  3. #3
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    sorry but which scroll bars are you talking about ?

  4. #4

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    HMMMMMMMMMMMMMM!!!!!!
    I just saw someone using this method, I guess this works too oh well. You just create a scroll bar and check its width heh

    Dim tmp as new vscrollbar
    msgbox tmp.width
    Last edited by MrPolite; Feb 1st, 2003 at 07:59 PM.
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width