PDA

Click to See Complete Forum and Search --> : API Screen Resolution Call


mikef
Jun 2nd, 2000, 01:33 AM
I am following the example from this page to retrieve the Screen Resolution using the API call: GetSystemMetrics. It is returning the X screen value in both variables. Here is my code:

ScrnResX = GetSystemMetrics(SM_CXSCREEN) & "X" & _ GetSystemMetrics(SM_CYSCREEN)

The call is returning: 1024X1024 in the string, but it should be returning: 1024X768

Why is it returning the X screen value twice??? How do I make it return 1024X768????

Jun 2nd, 2000, 02:23 AM
Try putting it on seperate lines.


resx = GetSystemMetrics(SM_CXSCREEN)
resy = GetSystemMetrics(SM_CYSCREEN)