vba - How to obtain physical size of monitor with VB(A) -
there thread @ stackoverflow describes how physical screen/monitor size/dimensions using edid.
is there developer able re-write c++ code vba ???
greetings germany
ralf
#if win64 declare ptrsafe function getsystemmetrics lib "user32" (byval nindex long) long #else declare function getsystemmetrics lib "user32" (byval nindex long) long #end if const sm_cxscreen long = 0 const sm_cyscreen long = 1 sub get_screen_metrics() lx = getsystemmetrics(sm_cxscreen) ly = getsystemmetrics(sm_cyscreen) '-------------------------------------------------------- ' coded shasur http://vbadud.blogspot.com 'http://vbadud.blogspot.co.uk/2007/05/visual-basic-get-screen-area.html '-------------------------------------------------------- msgbox "the screen area " & lx & " x " & ly & " pixels" end sub
see link available metrics http://msdn.microsoft.com/en-us/library/windows/desktop/ms724385(v=vs.85).aspx
then convert pixels length
http://office.microsoft.com/en-us/excel-help/measurement-units-and-rulers-in-excel-hp001151724.aspx
Comments
Post a Comment