Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 10 of 12 total
Thread OT: Form position poMainFormCenter
Mon, Aug 13 2007 12:21 PMPermanent Link

Jon Lloyd Duerdoth
A simple problem no doubt...

If I set position to poMainFormCenter at design time,
it always gets reset to poDesigned by the end of FormCreate
at run-time.

The only way I can get poMainFormCenter is to set it at run
time in FormActivate.

What simple thing am I missing?

Jon
Mon, Aug 13 2007 12:56 PMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Jon


Using D6 and D2006 I use poMainFormCentre on a number of my forms and don't have a problem. I presume you've tried tracing through the FormCreate event to see if you can spot the guilty bit of code?

Roy Lambert
Mon, Aug 13 2007 4:55 PMPermanent Link

Jon Lloyd Duerdoth
Roy,

I'm using D2006...

I set a watch and it's poMainFormCentre until
the first line of FormActivate.

I even created a 2 form dummy program so there's
no extra code... I'm baffled!

Jon

Roy Lambert wrote:
> Jon
>
>
> Using D6 and D2006 I use poMainFormCentre on a number of my forms and don't have a problem. I presume you've tried tracing through the FormCreate event to see if you can spot the guilty bit of code?
>
> Roy Lambert
>
Tue, Aug 14 2007 3:55 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Jon


Just tried here with a two form app.

Form1 has a button calling form2.showmodal

I've tried it with with having both forms autocreated and haveing form1 autocreated with form2 being created by form1. In both cases it works as expected with form2 being displayed in the middle of form1.

If you want to email me your test app I'll give it a go here and see what happens.

Roy Lambert
Tue, Aug 14 2007 3:46 PMPermanent Link

Jon Lloyd Duerdoth
Roy,

Thanks Roy... I may just take you up on that.

Meanwhile, I'll look for some foolish setting...
I am wondering if I'm up to date with my Delhi
service packs... that maybe it's an issue that's been fixed.

Jon

Roy Lambert wrote:
> Jon
>
>
> Just tried here with a two form app.
>
> Form1 has a button calling form2.showmodal
>
> I've tried it with with having both forms autocreated and haveing form1 autocreated with form2 being created by form1. In both cases it works as expected with form2 being displayed in the middle of form1.
>
> If you want to email me your test app I'll give it a go here and see what happens.
>
> Roy Lambert
>
Wed, Aug 15 2007 10:54 PMPermanent Link

Jon Lloyd Duerdoth
Roy,

A further follow up

1. yes it works at run-time providing you recreate the form
   each time.
2. stepping through the code still gives what appears to be false
   information when it arrives at FormActivate (says it's poDesign)

The original problem surfaced because I was not releasing and
re-creating the form... in trying to find the problem I was mislead
by the value assigned to form.position.

Thanks for your input.

Jon

Roy Lambert wrote:
> Jon
>
>
> Just tried here with a two form app.
>
> Form1 has a button calling form2.showmodal
>
> I've tried it with with having both forms autocreated and haveing form1 autocreated with form2 being created by form1. In both cases it works as expected with form2 being displayed in the middle of form1.
>
> If you want to email me your test app I'll give it a go here and see what happens.
>
> Roy Lambert
>
Thu, Aug 16 2007 2:08 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Jon


I don't want to mislead but it worked fine for me when I allowed the app to autocreate the form and just repeatedly called it.

Roy Lambert
Fri, Aug 17 2007 12:55 PMPermanent Link

Jon Lloyd Duerdoth
But did you move the master form and click to create the sub-form?

Jon

Roy Lambert wrote:
> Jon
>
>
> I don't want to mislead but it worked fine for me when I allowed the app to autocreate the form and just repeatedly called it.
>
> Roy Lambert
>
Fri, Aug 17 2007 1:54 PMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Jon

>But did you move the master form and click to create the sub-form?

I have now Smiley

Autocreated secondary form:
Moving the main form doesn't seem to do anything
Moving the secondary form means on the next click the secondary form appears at the position I moved it to

Manually created secondary form
Fine

The motto is create your forms when needed and then zap em so they're fresh next time.

Roy Lambert
Fri, Aug 17 2007 8:16 PMPermanent Link

Jon Lloyd Duerdoth
That's what I learned too! Smile

Jon

Roy Lambert wrote:
> Jon
>
>> But did you move the master form and click to create the sub-form?
>
> I have now Smiley
>
> Autocreated secondary form:
> Moving the main form doesn't seem to do anything
> Moving the secondary form means on the next click the secondary form appears at the position I moved it to
>
> Manually created secondary form
> Fine
>
> The motto is create your forms when needed and then zap em so they're fresh next time.
>
> Roy Lambert
Page 1 of 2Next Page
Jump to Page:  1 2
Image