Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Show form as circle
Message
De
19/08/2004 04:30:51
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
19/08/2004 00:25:24
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00934377
Message ID:
00934410
Vues:
19
>Dear Sir,
>
>How to use following codes, in VFP6, to show form as circle.
>
>
>
>LOCAL nhWnd, nWidth, nHeight, nRegion
>
>DECLARE INTEGER CreateEllipticRgn IN gdi32 ;
>        INTEGER X1 , INTEGER Y1 , INTEGER X2 , INTEGER Y2
>DECLARE INTEGER SetWindowRgn IN user32 ;
>        INTEGER HWND, INTEGER hRgn , INTEGER bRedraw
>
>nhWnd = This.HWnd
>nWidth = This.WIDTH / 1 && change ratio
>nHeight = This.HEIGHT / 1 && change ratio
>nRegion = CreateEllipticRgn(0, 0, nWidth, nHeight)
>SetWindowRgn(nhWnd, nRegion, 1)
>
>
>Please help

Tariq,
You already wrote the code yourself. What's the problem. Make width equal to height for circle. ie:
oForm = Createobject('myForm')
oForm.Show
Read Events

Define Class myForm As Form
  BorderStyle = 0
  Width = 260
  Height = 260
  TitleBar = 0
  DoCreate = .T.
  Add Object btnExit As CommandButton With ;
    Height = 30, Width = 40, Left = 110, Top = 115, Caption = 'Exit'

  Procedure Init
    Declare Integer CreateEllipticRgn In gdi32 ;
      INTEGER X1 , Integer Y1 , Integer X2 , Integer Y2
    Declare Integer SetWindowRgn In user32 ;
      INTEGER HWnd, Integer hRgn , Integer bRedraw
    SetWindowRgn(This.HWnd, ;
      CreateEllipticRgn(0,0, This.Width, This.Height), 1)

  Endproc
  Procedure btnExit.Click
    Clear Events
    Thisform.Release
  Endproc
Enddefine
PS: I don't have a bit idea what you'd do with such a form.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform