Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with autocenter for form object

Status
Not open for further replies.

BundaZSZ

Programmer
Sep 6, 2003
12
RO
i run a form with as top level
in this i run a form in top level option
the autocenter option is set to .F.

??? why my second form is aoto centering ????

how coul i fix this

thank you for your help
 
BundaZSZ

Where would you like the second form to appear? "In top level" option will make the form appear within the first top level form

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
yes but my second form is AutocCntering and:
AutoCenter = .F.
Top = 0

Why is still AutoCentering my second form in the first one
 
BundaZSZ,

There is something else at play here, as the following code will demonstrate. Cut-n-paste the code below into a prg file and run it from within VFP and you will see that the second contained form is not centered within the top level form.

Code:
PUBLIC oForm, oForm2
oForm = CREATEOBJECT("clsform")
oForm.visible = .t.
oForm2 = CREATEOBJECT("clsform2")
oForm2.visible = .t.

DEFINE CLASS clsform as Form
	width = 400
	height = 400
	Autocenter = .t.
	windowtype = 0
	showwindow = 2
ENDDEFINE

DEFINE CLASS clsform2 as Form
	width = 150
	height = 150
	Top = 0
	Autocenter = .f.
	windowtype = 0
	showwindow = 1
ENDDEFINE

Slighthaze = NULL

[ul][li]FAQ184-2483
An excellent guide to getting a fast and accurate response to your questions in this forum.[/li][/ul]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top