Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: David Mustakim
  Where is David Mustakim?
 Jakarta
 Indonesia
 David Mustakim
 Tags
Subject: DIFFRERENT SHAPE VFP FORMS
Thread ID: 395778 Message ID: 395778 # Views: 132 # Ratings: 13
Version: Not Applicable Category: Win32API programming
Date: Sunday, January 19, 2014 7:48:34 AM         
   


Just now I came across an old form "trick" I had filed in my external HD drive. Of course I must have copied it from somewhere, likely the famous "vfpimaging" site. Anyway I just re-post it here in case anyone is looking for a present need.

Just place any one of the followings in the load event of the form you want to have the specific shape:
* Round / Elliptical
Declare Long CreateEllipticRgn IN WIN32API Long X1, Long Y1, Long X2, Long Y2
Declare Long SetWindowRgn IN WIN32API Long hWnd, Long hRgn, String bRedraw
SetWindowRgn(thisform.hwnd, CreateEllipticRgn(1,1,400,400), "True")

* OR:

* Rectangle / Square 
Declare Long CreateRectRgn IN WIN32API Long X1, Long Y1, Long X2, Long Y2
Declare Long SetWindowRgn IN WIN32API Long hWnd, Long hRgn, String bRedraw
SetWindowRgn(thisform.hwnd, CreateRectRgn(1,1,100,100), "True")

* OR:

* Rectangele with round corners
Declare Long CreateRoundRectRgn IN WIN32API Long X1, Long Y1, Long X2, Long Y2, Long X3, Long Y3
Declare Long SetWindowRgn IN WIN32API Long hWnd, Long hRgn, String bRedraw
SetWindowRgn(thisform.hwnd, CreateRoundRectRgn(1,1,100,100,50,50), "True")


Just play with the figures in brackets and you'd master its use in no time

Regards,
David

ENTIRE THREAD

DIFFRERENT SHAPE VFP FORMS Posted by David Mustakim @ 1/19/2014 7:48:34 AM
RE: DIFFRERENT SHAPE VFP FORMS Posted by Rick C. Hodgin @ 1/19/2014 1:46:10 PM
RE: DIFFRERENT SHAPE VFP FORMS Posted by David Mustakim @ 1/19/2014 3:18:13 PM
RE: DIFFRERENT SHAPE VFP FORMS Posted by Rick C. Hodgin @ 1/19/2014 7:03:23 PM
RE: DIFFRERENT SHAPE VFP FORMS Posted by David Mustakim @ 1/19/2014 7:16:59 PM
RE: DIFFRERENT SHAPE VFP FORMS Posted by Vilhelm-Ion Praisach @ 1/20/2014 9:17:24 AM
RE: DIFFRERENT SHAPE VFP FORMS Posted by David Mustakim @ 1/20/2014 10:16:40 AM
RE: DIFFRERENT SHAPE VFP FORMS Posted by Vilhelm-Ion Praisach @ 1/20/2014 11:22:19 AM
RE: DIFFRERENT SHAPE VFP FORMS Posted by David Mustakim @ 1/20/2014 11:32:48 AM
RE: DIFFRERENT SHAPE VFP FORMS Posted by Vilhelm-Ion Praisach @ 1/19/2014 7:44:58 PM
RE: DIFFRERENT SHAPE VFP FORMS Posted by Rick C. Hodgin @ 1/19/2014 11:17:05 PM
RE: DIFFRERENT SHAPE VFP FORMS Posted by Jun Tangunan @ 1/20/2014 12:00:40 AM
RE: DIFFRERENT SHAPE VFP FORMS Posted by Tony Vignone @ 1/19/2014 8:48:24 PM
RE: DIFFRERENT SHAPE VFP FORMS Posted by David Mustakim @ 1/19/2014 8:53:07 PM
RE: DIFFRERENT SHAPE VFP FORMS Posted by Tony Vignone @ 1/20/2014 3:35:10 AM
RE: DIFFRERENT SHAPE VFP FORMS Posted by Vilhelm-Ion Praisach @ 1/19/2014 9:27:53 PM
RE: DIFFRERENT SHAPE VFP FORMS Posted by Tony Vignone @ 1/20/2014 3:33:57 AM