Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Create Non-Rectangular VFP

Tips -N- Tricks

How to Create Non-Rectangular VFP

by  Mike Gagnon  Posted    (Edited  )
The following will make your VFP (or your own application )into an elliptical shape. Pretty useless, but interesting.

Code:
LOCAL lhWnd
LOCAL lhRgn
DECLARE LONG FindWindowA IN WIN32API STRING class, STRING title
DECLARE LONG CreateEllipticRgn in WIN32API INTEGER left, INTEGER top, INTEGER right, INTEGER bottom
DECLARE INTEGER SetWindowRgn in WIN32API LONG hWnd, LONG hRgn, INTEGER redraw
DECLARE INTEGER DeleteObject in WIN32API LONG hObject

lhWnd = FindWindowA(0, _VFP.Caption)
lhRgn = CreateEllipticRgn(1, 1, _VFP.Width, _VFP.Height)

? SetWindowRgn(lhWnd, lhRgn, 1)
? DeleteObject(lhRgn)
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top