Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 6 of 6 total |
Strange 2 forms being displayed at same time... |
Mon, Dec 12 2016 3:05 AM | Permanent Link |
Richard Mace | Hi,
I have a strange issue in that when my application is first run, it's actually showing both of the forms at the same time as per screen shot. The Add button is the only visible control on the main form and the rest of the controls are all on a "User Properties" form that isn't being shown. The only form that is auto created is the main form, and the User Properties form is created, a single time, in the main form's OnShow event, as per the following code: frmUserProperties := TfrmUserProperties.Create(nil); frmUserProperties.Hide; frmUserProperties.Parent := Self; Any pointers as to what I am doing wrong? Thanks Richard Attachments: 2xforms.png |
Mon, Dec 12 2016 3:22 AM | Permanent Link |
Chris Holland SEC Solutions Ltd. Team Elevate | You might want to try creating the second form in the OnCreate event
rather that the OnShow otherwise it will get created each time the main form is shown. Chris Holland [Team Elevate] On 12/12/2016 08:05, Richard wrote: > Hi, > > I have a strange issue in that when my application is first run, it's actually showing both of the forms at the same time as per screen shot. > > The Add button is the only visible control on the main form and the rest of the controls are all on a "User Properties" form that isn't being shown. > > The only form that is auto created is the main form, and the User Properties form is created, a single time, in the main form's OnShow event, as per the following code: > > frmUserProperties := TfrmUserProperties.Create(nil); > frmUserProperties.Hide; > frmUserProperties.Parent := Self; > > Any pointers as to what I am doing wrong? > > Thanks > > Richard > |
Mon, Dec 12 2016 4:58 AM | Permanent Link |
Matthew Jones | Richard wrote:
> TfrmUserProperties.Create(nil); I think that should be either the form, or the application, as the owner of the form, not nil. Also, you hide it - why not have it hidden already? -- Matthew Jones |
Mon, Dec 12 2016 7:37 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Richard,
<< The only form that is auto created is the main form, and the User Properties form is created, a single time, in the main form's OnShow event, as per the following code: frmUserProperties := TfrmUserProperties.Create(nil); frmUserProperties.Hide; frmUserProperties.Parent := Self; Any pointers as to what I am doing wrong? >> Why are you creating the form in the OnShow event if you don't want it to be visible ? Why not just wait until you need to create/show it ? Tim Young Elevate Software www.elevatesoft.com |
Mon, Dec 12 2016 7:38 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Richard,
Also, are you intending to parent the form to the calling form ? Tim Young Elevate Software www.elevatesoft.com |
Tue, Dec 13 2016 3:03 AM | Permanent Link |
Richard Mace | Thanks for everyone's replies.
I have fixed a couple of bugs in my code and re-arranged it slightly as per suggestions, and it all works well now. Thanks Richard |
This web page was last updated on Wednesday, October 16, 2024 at 02:36 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |