Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can MouseMove move a form
Message
From
27/09/2000 00:10:25
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00421254
Message ID:
00421299
Views:
23
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform