About custom balloon

Please post bug reports, feature requests, or any question regarding the DELPHI AREA projects here.

About custom balloon

Postby alexhaifa » December 15th, 2005, 10:16 am

Hi, I would like whether I am creating my custom balloon correctly. Because sometimes I get an error with balloon in windows 2000 and xp.

FBLNW01 is a balloon
Agente is the assistent

Code: Select all
  FBLNW01 := TFBLNW01.Create(Self);
  Try
    Agente.AutoIdle     := False;
    If Not Agente.Showing Then
       Begin
         Agente.Show;
         MoveAleatorio;
       End;
    Agente.CustomDialog := FBLNW01;
    Agente.ShowCustomModal;
  Finally
    FBLNW01.Release;
    FBLNW01 := Nil;
  End;
  FechaPrograma.Enabled := True;
alexhaifa
Junior Member
Junior Member
 
Posts: 35
Joined: November 22nd, 2005, 2:01 pm
Location: Brazil

Postby Kambiz » December 15th, 2005, 7:34 pm

For Owner of the forms use Application:

Code: Select all
FBLNW01 := TFBLNW01.Create(Application);

And, instead of Release always use Free:

Code: Select all
FBLNW01.Free;

These may fix the problem.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2429
Joined: March 7th, 2003, 7:10 pm

Postby alexhaifa » December 16th, 2005, 3:05 pm

I am gonna try this, thanks once again
alexhaifa
Junior Member
Junior Member
 
Posts: 35
Joined: November 22nd, 2005, 2:01 pm
Location: Brazil

Postby alexhaifa » December 16th, 2005, 11:13 pm

Kambiz, I noticed that If the custom balloon is created when the program is called, not only when I call the custom balloon as I was doing, there is no error. But if I close the custom ballon and use free, after three calling or more, I got an error.


Here the balloon is created, and not as I was doing. There isn't any error this way.

Application.Initialize;
Application.CreateForm(TFMENU, FMENU);
Application.CreateForm(TFBLNW01, FBLNW01);
Application.Run;

But I need to use it only this way.

Agente.CustomDialog := FBLNW01;
Agente.ShowCustomModal;

If I give free after close the balloon, after three times or more I got an error.

Please check this for me. My project is gonna have more than 15 custom balloon

Thanks
alexhaifa
Junior Member
Junior Member
 
Posts: 35
Joined: November 22nd, 2005, 2:01 pm
Location: Brazil

Postby Kambiz » December 17th, 2005, 10:05 am

Set Agente.CustomDialog to nil before releasing the balloon.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2429
Joined: March 7th, 2003, 7:10 pm

Postby alexhaifa » December 19th, 2005, 12:25 pm

Kambiz, once again thanks.

It didn't give me problem anymore.

Alex
alexhaifa
Junior Member
Junior Member
 
Posts: 35
Joined: November 22nd, 2005, 2:01 pm
Location: Brazil


Return to DELPHI AREA Projects

Who is online

Users browsing this forum: No registered users and 1 guest

cron