Discussion:
Form closed right after creation
(too old to reply)
Dan Hughes
2008-07-21 20:17:36 UTC
Permalink
Hello,

I have a dll based expert that loads a hidden form that is used to communicate
with an external program. The form is created when the expert gets loaded
and the code has worked correctly until Rad Studio 2007. What happens in
RS 2007 is the form is created and then is destroyed shortly after it is
created. I have found that if I delay the creation of the form until after
the IDE has finished loading other libraries that it work correctly but the
problem with this approach is that the time can vary depending upon what
is loaded upon starting Delphi. Is there a notification that I can use to
get notified when the IDE has finished loading all of the libraries so I
can wait for the notification to create my form?

Thanks for your time.

Dan
Lex Y. Li
2008-07-25 12:22:14 UTC
Permalink
Hi Dan, IMHO use timeout is still the best solution. But there is
another way. When you bind to IOTAService.FileNotification, you may know
when the start up page is loaded into IDE. Then you can create your
invisible form. However, if start up page is disabled by the user, this
way fails.
Christian Wilkerson
2008-07-26 00:13:05 UTC
Permalink
Post by Dan Hughes
Hello,
I have a dll based expert that loads a hidden form that is used to
communicate with an external program. The form is created when the expert
gets loaded and the code has worked correctly until Rad Studio 2007. What
happens in RS 2007 is the form is created and then is destroyed shortly
after it is created. I have found that if I delay the creation of the
form until after the IDE has finished loading other libraries that it work
correctly but the problem with this approach is that the time can vary
depending upon what is loaded upon starting Delphi. Is there a
notification that I can use to get notified when the IDE has finished
loading all of the libraries so I can wait for the notification to create
my form?
Thanks for your time.
Dan
I know that using an IOTAIDENotifier you can get a notification for when a
package is loaded. Therefore, why not use your delay strategy, but add time
to your delay everytime a package gets loaded. That way you're sure to not
end your wait too early.
--
Christian Wilkerson
Home made country music
@ http://www.myspace.com/christianwilkersonmusic
Loading...