Results 1 to 5 of 5
  1. #1
    Lounger
    Join Date
    Aug 2006
    Posts
    48
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Do I have an active mousepad (Any)

    Can Word VBA find out what hardware is available? Eg, if I'm using a notepad with an (active) mousepad, I don't want scrollbars visible in Word (since I can use the ones on the mousepad).

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Do I have an active mousepad (Any)

    Word VBA itself doesn't provide information about hardware, but there are probably Windows API functions that do. I haven't been able to find specific information, however.

  3. #3
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Do I have an active mousepad (Any)

    Does the attached file do what you are looking for?
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

  4. #4
    Lounger
    Join Date
    Aug 2006
    Posts
    48
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Do I have an active mousepad (Any)

    It sure is what I'm looking for, Jan! Did you have this sitting round in your back pocket waiting to be used, or did you knock it up on the spot? Either way, I'm grateful.

    I'll use it rather simplistically, using this logic: Check to see whether I have a second mouse. If so, assume it's an onboard mousepad, and assume that the mousepad is active, and assume that the mousepad is modern enough to have scrollbar capability. So, hide my Word scrollbars. Something like this (I haven't fully tested it yet):<pre>Public Sub ScrollbarsSetting()
    With ActiveWindow
    .DisplayVerticalScrollBar = Not Mousepad_Exists
    .DisplayHorizontalScrollBar = .DisplayVerticalScrollBar
    End With
    End Sub

  5. #5
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Do I have an active mousepad (Any)

    I googled for some time, snooped around on MSDN and finally found some code on vbnet.mvps.org
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

Posting Permissions

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