Visual Basic Core Snippet Routines
   Returns True if the current system is running more than one monitor.      
           Updated:   Monday December 26, 2011   
click to copy code:  

   Applies to:   VB4-32, VB5, VB6   
OS restrictions:   Win 98/Me, 2000/XP  
 Code Snippet
' Copyright 1996-2011 VBnet/Randy Birch, All Rights Reserved.
' Some pages may also contain other copyrights by the author.
' Distribution: You can freely use this code in your own
'               applications, but you may not reproduce 
'               or publish this code on any web site,
'               online service, or distribute as source 
'               on any media without express permission.
Private Const SM_CMONITORS As Long = 80
Private Declare Function GetSystemMetrics Lib "user32" _
   (ByVal nIndex As Long) As Long
Private Function IsMultiMonitorSystem() As Boolean

  'Returns True if a multi-monitor system
   IsMultiMonitorSystem = GetSystemMetrics(SM_CMONITORS) > 1

End Function

 Calling Syntax
   bIsMulti = IsMultiMonitorSystem()

 Comments / Related
demo in use:    
Related:   GetUserName
NetUserGetInfo: Enumerate the User List and Obtain User Info  


PayPal Link
Make payments with PayPal - it's fast, free and secure!


Copyright 1996-2011 VBnet and Randy Birch. All Rights Reserved.
Terms of Use  |  Your Privacy


Hit Counter