ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Problem with PhotoEn demo
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

PStadler

Austria
60 Posts

Posted - Jun 09 2018 :  05:59:41  Show Profile  Reply
Hello,

This is an error I found since last version changes of ImagEn in several projects. But I could reproduce it now
with PhotoEn demo.

If I open an image file in the PhotoEn demo via Menu File/Open, everything is ok.

If I want to open the same image file with FormCreate


procedure TMainForm.FormCreate(Sender: TObject);
var
  Filename : string;
begin
  Application.OnHint := ShowHint;
  Screen.OnActiveFormChange := UpdateMenuItems;

  SpeedPanel.ParentBackground := False;
  Panel1.ParentBackground := False;
  
  
  FileName := 'C:\Temp\Bild 1.png';
  CreateMDIChild(FileName, false);
end;


I get the error in German "Formular kann nicht erstellt werden. Aktuell sind keine MDI-Formulare aktiv"
in English : "Form cannot be produced. Actually no MDI-Forms are active"

What shall I add to FormCreate?

Sincerely Peter

xequte

38176 Posts

Posted - Jun 10 2018 :  19:49:05  Show Profile  Reply
Hi Peter

That is more of a Delphi issue than an ImageEn one. Create the child form in FormShow/FormActivate, or google other solutions at:

https://www.google.com/search?q="no+mdi+forms+are+currently+active"




Nigel
Xequte Software
www.imageen.com
Go to Top of Page

PStadler

Austria
60 Posts

Posted - Jun 11 2018 :  01:56:55  Show Profile  Reply
Hello,

I know the search functions from Google, but it was not of any help.

You mentioned to use FormShow and Formactivate. But did you try it ever?

FormShow and FormActivate as well as FormPaint give the same error.

But FormPaint opens after the error many instances of the image.

If I create new MainMenu item File/Open2 everything works well.


procedure TMainForm.Open21Click(Sender: TObject);
var
  FileName : string;
begin
  //
  FileName := 'C:\Temp\Bild 1.png';
  CreateMDIChild(FileName, false);
end;



But I need to call it with FormCreate, FormShow or Formactivate.

So it seems that a process of loading has not finished when calling FormShow and FormActivate.
But which initialization is it?



Sincerely Peter
Go to Top of Page

Ruekaka

Germany
25 Posts

Posted - Jun 11 2018 :  18:11:45  Show Profile  Reply
Hello,

I tried it in the FormShow event and it worked (it crashes in FormCreate as you described, but FormShow works fine for me).

I tried with Delphi 2007 and Delphi 10.2.3 using ImageEn 7.5.


With kind regards,
Ruediger Kabbasch
Go to Top of Page

xequte

38176 Posts

Posted - Jun 12 2018 :  06:31:10  Show Profile  Reply
Hi Peter

It works fine for me in FormShow too.

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

PStadler

Austria
60 Posts

Posted - Jun 13 2018 :  01:57:34  Show Profile  Reply
Hello,

FormShow works now in a new Programm instance too.

Thank you very much

Peter
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: