Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Objtoclient()
Message
De
10/02/2005 22:59:47
Suhas Hegde
Dental Surgeon
Sirsi, Inde
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Objtoclient()
Versions des environnements
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP
Network:
Windows 98
Database:
Visual FoxPro
Divers
Thread ID:
00985863
Message ID:
00985863
Vues:
53
hi,
I want to display a window through define window.
If i put these codes in the click on the button it appears fine but if in the init of the form it displays different. Why and where should i place it?
PUBLIC oform1

oform1=NEWOBJECT("form1")
oform1.Show
RETURN
**************************************************
*-- Form:         form1 (c:\form1.scx)
*-- ParentClass:  form
*-- BaseClass:    form
*-- Time Stamp:   02/11/05 09:00:04 AM
*
DEFINE CLASS form1 AS form
	DoCreate = .T.
	Caption = "Form1"
	Name = "Form1"
	ADD OBJECT pageframe1 AS pageframe WITH ;
		ErasePage = .T., ;
		PageCount = 2, ;
		Top = 60, ;
		Left = 36, ;
		Width = 325, ;
		Height = 185, ;
		Name = "Pageframe1", ;
		Page1.Caption = "Page1", ;
		Page1.Name = "Page1", ;
		Page2.Caption = "Page2", ;
		Page2.Name = "Page2"
	ADD OBJECT form1.pageframe1.page1.shape1 AS shape WITH ;
		Top = 44, ;
		Left = 47, ;
		Height = 85, ;
		Width = 241, ;
		Name = "Shape1"
	PROCEDURE Init
		o =  thisform.pageframe1.page1.shape1
		wleft	=	objtoclient(o,2)
		wtop	=	objtoclient(o,1)
		wwidth	=	objtoclient(o,3)
		wheight	=	objtoclient(o,4)
		define window wpreview at 0,0 size 1,1 in window form1 name wpreview
		with wpreview
		.left	=	wleft
		.top	=	wtop
		.width	=	wwidth
		.height	=	wheight
		.show()
		endwith
	ENDPROC
ENDDEFINE
*
*-- EndDefine: form1
**************************************************
TIA

Suhashegde
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform