@eric.bunn wrote:
Hi,
I was search around looking for a way to capture the size of the screen using python and found this link:
[https://developer.rhino3d.com/api/rhinoscript/utility_methods/getsystemmetrics.htm]I cannot seem to locate this in the help files for Rhinoscript? I’ve used this Windows Function in VBA for many years but cannot determine how to do this in Python.
In VBA I would access it this way:
Private Declare PtrSafe Function GetSystemMetrics32 Lib “user32” Alias “GetSystemMetrics” ( _
ByVal nIndex As LongPtr) As LongPtrPrivate Sub GetWindowSize(lngWidth As LongPtr, lngHeight As LongPtr)
Set swApp = Application.SldWorks swApp.Visible = True swApp.UserControl = True lngWidth = GetSystemMetrics32(0) ' width in points lngHeight = GetSystemMetrics32(1) ' height in points
End Sub
Any help would be greatly appreciated.
Eric
Posts: 1
Participants: 1