How to get screen size ?
It is pretty much the same as the third piece of code i gave you:
Declare Function GetSystemMetrics Lib "user32" _
(ByVal nIndex As Long) As Long
Sub test()
MsgBox prompt:=GetSystemMetrics(0) _
& "x" & GetSystemMetrics(1)
End Sub
Worked for me. Probably a word wrap problem.
--
Regards,
Tom Ogilvy
"Leo Luk" wrote in message
...
Thanks for your response and appreciate your help. I copy
the code and try but keep geting 0x0 (I must have done
something incorrectly). I did try the one suggested by
Tom Ogilvy and is working.
Thanks and Merry Christmas
Leo
-----Original Message-----
Declare Function GetSystemMetrics Lib "user32" (ByVal
nIndex As Long) As Long
sub test()
msgbox prompt:= GetSystemMetrics(0) & "x" &
GetSystemMetrics(1)
end
The above worked for me
-----Original Message-----
Do any one know how to obtain the screen size property
via
VBA ? (For example 1280 by 1024, 1024 by 768 ...)
I have developed an application at home but it look
aweful
when I try to run it at work because it was based on the
screen size used at home.
Help
.
.
|