2013-08-07 2 views

답변

0
#If Win64 Then 
    Declare PtrSafe Function GetSystemMetrics Lib "user32" (ByVal nIndex As Long) As Long 
#Else 
    Declare Function GetSystemMetrics Lib "user32" (ByVal nIndex As Long) As Long 
#End If 

Const SM_CXSCREEN As Long = 0 
Const SM_CYSCREEN As Long = 1 


Sub Get_Screen_Metrics() 

lx = GetSystemMetrics(SM_CXSCREEN) 
ly = GetSystemMetrics(SM_CYSCREEN) 

'-------------------------------------------------------- 
' Coded by Shasur for http://vbadud.blogspot.com 
'http://vbadud.blogspot.co.uk/2007/05/visual-basic-get-screen-area.html 
'-------------------------------------------------------- 

MsgBox "The Screen Area is " & lx & " x " & ly & " pixels" 
End Sub 

에서

인사

는 그런 길이

http://office.microsoft.com/en-us/excel-help/measurement-units-and-rulers-in-excel-HP001151724.aspx

에 픽셀로 변환 가능한 측정 http://msdn.microsoft.com/en-us/library/windows/desktop/ms724385(v=vs.85).aspx이 링크를 참조
관련 문제