Author Topic: Berbagai kemungkinan bentuk juru ketik eh form  (Read 503 times)

0 Members and 1 Guest are viewing this topic.

Offline davidmustakim

  • Fox-id M.V.P
  • Hero Member
  • *
  • Posts: 14.053
  • Awas ya...
Berbagai kemungkinan bentuk juru ketik eh form
« on: April 12, 2014, 01:14:34 PM »
Beberapa bulan lalu saya posting ini di Foxite dan lupa copy kemari; sekedar buat pengisi waktu juru ketik kelurahan experimen dengan berbagai kemungkinan bentuk form - untuk dibanding kemungkinan bentuk calon pendamping ga ada lah salahnya
Quote
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