Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Have fun
Message
De
21/05/2003 22:11:24
 
 
À
21/05/2003 15:21:33
Mike Yearwood
Toronto, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00791118
Message ID:
00791421
Vues:
26
Now you've done it Mike. My whole office is inventing new patterns....
Try:
   .width    600
   .height   600
   x         300
   y         150
Beautiful!

And for the arts award make these changes...
DEFINE WINDOW Superwnd FROM 10,10 TO 50, 50 NAME mywnd
  .WIDTH=500
  .HEIGHT=500
   xdir = 300
   ydir = 150
 
   IF m.x > 400 OR m.x < 100
 
   IF m.y > 400 OR m.y < 25
Awesome



>Here's what a few minutes of tweaking can do ;) Try it!
>
>
>SET ESCAPE ON
>ON ESCAPE DO iquit
>
>DEFINE WINDOW Superwnd FROM 10,10 TO 30, 30 NAME mywnd
>WITH mywnd
>  .WIDTH=300
>  .HEIGHT=300
>  .AUTOCENTER=.T.
>  SHOW WINDOW Superwnd
>  SET CURSOR OFF
>  ACTIVATE WINDOW Superwnd
>  ACTIVATE SCREEN
>  Angle=0
>  WAIT WINDOW NOWA "Hit ESC to terminate..."
>
>  *Add some variables to allow the circles to bounce.
>  xdir = 1
>  ydir = 1
>  x=150
>  y=70
>
>  DO WHILE .T.
>
>    .FORECOLOR=65535
>    .CIRCLE(50, m.x+m.y*COS(DTOR(m.Angle)), m.x+m.y*SIN(DTOR(m.Angle)))
>    .FORECOLOR=65408
>    .CIRCLE(50, m.x-m.y*COS(DTOR(m.Angle)), m.x-m.y*SIN(DTOR(m.Angle)))
>    .FORECOLOR=16711680
>    .CIRCLE(50, m.x+m.y*COS(DTOR(m.Angle+90)), m.x+m.y*SIN(DTOR(m.Angle+90)))
>    .FORECOLOR=255
>    .CIRCLE(50, m.x+m.y*COS(DTOR(m.Angle+270)), m.x+m.y*SIN(DTOR(m.Angle+270)))
>
>    IF m.Angle=359
>      Angle=0
>    ELSE
>      Angle=m.Angle+1
>    ENDIF
>
>    *Bounce the circles off the sides of the form
>    *by moving the center around.
>    IF m.x > 200 OR m.x < 100
>      xdir = -1 * m.xdir
>    ENDIF
>    x = m.x + m.xdir
>
>    IF m.y > 100 OR m.y < 25
>      ydir = -1 * m.ydir
>    ENDIF
>    y = m.y + m.ydir
>
>  ENDDO
>ENDWITH
>
>DO iquit
>
>*-------------
>  PROCEDURE iquit
>  mywnd.CLS
>  RELEASE mywnd
>  RELEASE WINDOWS Superwnd
>  SET CURSOR ON
>  ON ESCAPE
>  WAIT CLEAR
>  CANCEL
>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform