Devex gives an AV

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #42523
    Support
    Keymaster

      Thank you for the demo, I'll check it soon.

      #42595
      Teasy
      Participant

        Any luck?

        #42632
        Support
        Keymaster

          Hello.
          I haven't TCQLabel and TCQBitBtn controls, so, they were changed to standard TLabel and TBitBtn.
          Your problem occurs because this code in the project source is not good :

          CODE
            bCanStart := True;

            Application.Initialize;
            Application.MainFormOnTaskbar := True;

            Application.CreateForm(TDataModule3, DataModule3);

            Form1 := TForm1.Create(Application);
            if Form1.ShowModal <> mrOK then
              bCanStart := False;

            if not bCanStart then
            begin
              Form1.Free;
              Application.Terminate;
              Exit;
            end;

            Application.CreateForm(TForm2, Form2);
            Application.Run;

          You have memory leaks there, and these leaks are reason of the problem.
          Problem will be solved if you will use a code like this :

          CODE
            Application.Initialize;
            Application.MainFormOnTaskbar := True;

            Application.CreateForm(TDataModule3, DataModule3);

            Form1 := TForm1.Create(Application);

            bCanStart := Form1.ShowModal = mrOK;

            if bCanStart then Application.CreateForm(TForm2, Form2);
            Application.Run;

          #42691
          Teasy
          Participant

            Hi Serge,

            Thanks for the solution.
            Sorry for the inconvenience with my CQLabel en ditto button

            Author
            Posts
          Viewing 4 posts - 1 through 4 (of 4 total)
          • You must be logged in to reply to this topic.