* following returns window handle of _VFP object. _Screen object have another HWND, so GetDC will not work here, however it should work for HWND of regular form. declare integer GetActiveWindow in Win32API declare integer GetWindowDC in Win32API integer && GetDC when draw in client area only declare integer ReleaseDC in Win32API integer declare integer Ellipse in Win32API integer,integer,integer,integer,integer rr = GetActiveWindow() tt = GetWindowDC(rr) && GetDC when draw in client area only =Ellipse(tt,0,0,200,200) ReleaseDC(tt)Another sample (works for form only):
DECLARE INTEGER BeginPaint IN wIN32api INTEGER, STRING @rr DECLARE INTEGER EndPaint IN wIN32api INTEGER, STRING @rr ss = replicate(chr(0),64) ss = replicate(chr(0),64) tt = BeginPaint(nHWND,ss) =Ellipse(tt,0,0,200,200) EndPaint(nHWND,ss)In help for Win32API you will find a lot of functions related to painting.