Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to let any form to locate to upper left when minimized
Message
From
25/07/2005 23:41:52
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
How to let any form to locate to upper left when minimized
Miscellaneous
Thread ID:
01035855
Message ID:
01035855
Views:
56
Try the codes below:
click Minbutton of ofrm1 & ofrm2 respectively
ofrm1=CREATEOBJECT("testform") 
WITH ofrm1
    .addobject("cmdbutton1","cmdbutton")
    .cmdbutton1.visible=.t.
    .show(1)
ENDWITH 

DEFINE CLASS cmdbutton AS CommandButton  && Create Command button
             Top = 141
		Left = 331
		Height = 51
		Width = 175
		Caption = "Command1"
		Name = "Command1"
   PROCEDURE Click
             ofrm2=CREATEOBJECT("testform") 
             ofrm2.show(1)
ENDDEFINE

DEFINE CLASS testform AS form
	Top = 0
	Left = 0
	Height = 432
	Width = 670
	DoCreate = .T.
	Caption = "Form1"
	Name = "Form1"
	PROCEDURE Resize
		IF this.WindowState= 1
		   MOVE WINDOW (this.Name)  TO 1,1
		ENDIF 
	ENDPROC
ENDDEFINE
Steven
Next
Reply
Map
View

Click here to load this message in the networking platform