Hello
Once again, I'd need your help.
I was messing around (if I say so, although I only set the formstyle properties to mdiform and mdichild once, and then reset them to Normal, ever since my problem appears) formstyle property, and got some strange behaviour for which can't seem to find the solution, neither in the codes nor on google.
At runtime I get 2 forms shown by default: main form, which used to show firstly, and one another form, which I usually showed via button on the main form. It's not the second listed, but the last form listed in the CreateForm sequence.
Any ideas what I did and how to repair it? :S
Thanks much!

Recommended Answers

All 5 Replies

Sure.

I've already checked it, seems ok to me, but here it is:

program BitStack;

uses
  Vcl.Forms,
  Startup in 'Startup.pas' {Startup1},
  Main in 'Main.pas' {Main1},
  Controller in 'Controller.pas' {Controller1},
  Settings in 'Settings.pas' {Settings1},
  Patch in 'Patch.pas' {Patch1},
  Output in 'Output.pas' {Output1},
  StageVisual in 'StageVisual.pas' {StageVisual1},
  FixturesEditor in 'FixturesEditor.pas' {FixturesEditor1},
  FixturesEditorGlobal in 'FixturesEditorGlobal.pas' {FixturesEditor2};

{$R *.res}

begin
  Application.Initialize;
//  Application.MainFormOnTaskbar := True;
  Application.CreateForm(TStartup1, Startup1);
  Application.CreateForm(TMain1, Main1);
  Application.CreateForm(TController1, Controller1);
  Application.CreateForm(TSettings1, Settings1);
  Application.CreateForm(TPatch1, Patch1);
  Application.CreateForm(TOutput1, Output1);
  Application.CreateForm(TStageVisual1, StageVisual1);
  Application.CreateForm(TFixturesEditor1, FixturesEditor1);
  Application.CreateForm(TFixturesEditor2, FixturesEditor2);
  Application.Run;
end.

The forms shown on startup are TStartup1 and TFixturesEditor2.
Application.MainFormOnTaskbar:=True is disabled since the start of application building, and is that way because in some cases I hide the main form, and I want to keep the taskbar icon up..

Thanks

This is indeed ok. No reference anywhere that triggers the Show of that last form?

The only reference to show forms are in the Main forms on the buttons, one button to show each form, and meanwhile to hide main form, and then there are OnClose events at every form to re-show main form. That's about all and it's all there since a few days ago... :/

I'm running basic file compare process now to compare all .pas and .dfm files, I'll report if I success in finding anything. Thanks for your help.

Well... looks like 7 hours of project comparisons was productive after all. The form property "Visible" was set to True, of which I wasn't aware when looking settings and properties inside delphi itself. It was the only difference between this and all other forms (except for main, which had the same property value), so I went to delphi and tried to change it to False (although my first thought was that the form visibility should be set to true, so I can "show" it later with .show call procedure. This "show" and "visible" difference, but obviously practicaly-same function distracted me when in delphi.
That's my and completely beginners mistake, so my apologize for filling the forum, althoug, if this info comes useful to at least one person, than I'll feel ok. :)

I really should get through Delphi Basics more focused.. ;)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.