Page 1 sur 1

Résolution d'ecran pour notes pur

MessagePublié: 16 Fév 2007 à 14:15
par billbock
Type RECT
x1 As Long
y1 As Long
x2 As Long
y2 As Long
End Type
Declare Function GetDesktopWindow Lib "User32" () As Long
Declare Function GetWindowRect Lib "User32" (Byval hWnd As Long, rectangle As Rect) As Long


Dim session As notessession

Dim R As Rect
Dim hWnd As Long
Dim RetVal As Long
Dim GetScreenResolution As String
hWnd = GetDesktopWindow ()
RetVal = GetWindowRect(hWnd, R)
GetScreenResolution = (R.x2 - R.x1) & "x" & (R.y2 - R.y1)
Set session = New notessession

Call session.setenvironmentvar("resolution",GetScreenResolution)
'Msgbox session.getenvironmentstring("resolution")