|
Post by George on Sept 3, 2015 10:22:28 GMT -5
OK, maybe someone here can see an obvious error that I'm simply overlooking. Here's the snippet of code that re-loads the X/Y screen coordinates.
LastScreenX = VAL(sINIGetString("Screen", "LastScrX", "5")) LastScreenY = VAL(sINIGetString("Screen", "LastScrY", "5")) i = GetSystemMetrics(%SM_CXVirtualScreen) ' Get width of virtual screen j = GetSystemMetrics(%SM_XVirtualScreen) ' Get left hand side of virtual screen IF i <> 0 THEN ' Validate a bit IF LastScreenX < j OR LastScreenX > i+j THEN LastScreenX = 5 ' END IF ' i = GetSystemMetrics(%SM_CYVirtualScreen) ' Get height of virtual screen j = GetSystemMetrics(%SM_YVirtualScreen) ' Get top of virtual screen IF i <> 0 THEN ' Validate a bit IF LastScreenY < j OR LastScreenY > i+j THEN LastScreenY = 5 ' END IF
As I read it, there is no way I can end up with X/Y coordinates that located are off the systems virtual screen. (Unless GetSystemMetrics fails to return the height/width of the virtual screen, which I have never seen happen.)
Any and all ideas appreciated.
George
|
|