VB and VBA Users Source Code: Returning the number of monitors installed
[
Home
|
Contents
|
Search
|
Reply
| Previous | Next ]
VB/VBA Source Code
Returning the number of monitors installed
By:
Andrew Baker
Email (spam proof):
Email the originator of this post
Date:
Monday, June 23, 2003
Hits:
1196
Category:
Windows Forms/GUI/Controls/Graphics
Article:
The code below returns the number of monitors in use: Option Explicit Private Declare Function GetSystemMetrics Lib "user32" (ByVal nIndex As Long) As Long 'Purpose : Returns a count of the number of monitors/screens being used 'Inputs : N/A 'Outputs : Count of the number of monitors. 'Author : Andrew Baker 'Date : 03/09/2001 'Example : 'Revisions : Function MonitorCount() As Long Const SM_CMONITORS As Long = 80 MonitorCount = GetSystemMetrics(SM_CMONITORS) End Function
Terms and Conditions
Support this site
Download a trial version of the Excel Workbook Rebuilder