Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How I can move TopLevel Form without TitleBar?
Message
De
22/01/2001 12:23:28
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00465622
Message ID:
00466721
Vues:
10
>Hi!
>
>I have seen all you mentioned. that code just do not work. I click on the form trying to drag it -> nothing happens. What might prevent that code from functioning properly?
>

Vlad,

If you don't get the other code to work, here's some code that should: (All VFP)

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.

HTH!
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