Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Moving form
Message
De
02/06/2001 23:36:03
 
 
À
02/06/2001 23:31:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Divers
Thread ID:
00514271
Message ID:
00514272
Vues:
11
>Hi all:
>Iam giving a new look to my apps with textures, logos and screen wallpaper, but I want to remove the Forms title bar (this is easy) and the user still can move the form to other position with the mouse.
>Some one know how to do? I was trying with Thisform.Move and Mousemove, mousedown and other things without luck.
>
>Thanks In Advance
>
>Mauricio Flores Olmos

Easy. Add two properties to your form (XStart, YStart).

In the from MouseDown:
IF nButton=1
this.XStart = nXCoord
this.YStart = nYCoord
ENDIF

In the form MouseMove:
IF nButton=1
this.Left = nXCoord + OBJTOCLIENT(this,2) - this.xstart
this.Top = nYCoord + OBJTOCLIENT(this,1) - this.ystart
ENDIF

If you want to do this with a form that has a titlebar, just subtract the
titlebar size (SYSMETRIC(9)) from the above calculation for Top.
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform