'=================
'MagnifyCircle.bas
'=================
'Fake magnifying glass effect using Windows API
'Coded by Dav, FEB/2021
'This mostly just shows how to make a region and use it
'for a special effect. Grabs desktop, stretches it a little,
'darkens it for an overlay feel.
'Press ESC to end the effect and close program.
rgn& = CreateRoundRectRgn(30, 30, 180, 180, 150, 150)
mi = GetCursorPos(apixy): mx = apixy.x: my = apixy.y
x& = SetWindowPos(hwnd&, -1, mx - 100, my - 100, 0, 0, &H1)
x1 = -mx + 50: y1 = -my + 50
_PUTIMAGE (x1
, y1
)-(x2
+ 75, y2
+ 75), back&
, LINE (x1
, y1
)-(x2
+ 75, y2
+ 75), _RGBA(0, 0, 0, 50), BF