Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can MouseMove move a form
Message
De
27/09/2000 00:10:25
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00421254
Message ID:
00421299
Vues:
24
>I'm trying to develop a class which contains a graphic that will replace the title bar on a form. The object will stretch across the top of the form and will be invisible until the mouse hovers over it. The user can then use it to drag the form around the screen. When he unclicks and moves the mouse somewhere else, the graphic will dissapear.

How about something like this in the MouseMove:
LPARAMETERS nButton, nShift, nXCoord, nYCoord

with this
	do case
		case nYCoord > 4 and .TitleBar = 0
		case nYCoord > 4
			lnWidth = .Width
			.Top = .Top + sysmetric(9)
			.TitleBar = 0
			.Width = lnWidth
		case nYCoord <= 4 and .TitleBar = 1
		otherwise
			lnWidth = .Width
			.Top = .Top - sysmetric(9)
			.TitleBar = 1
			.Width = lnWidth
	endcase
endwith
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform