Board index » delphi » Application.terminate not working properly on delphi 4?

Application.terminate not working properly on delphi 4?

I'v just started with delphi 4 and made a small program to draw a fullscreen
hatch pattern for some testing purposes.

Because of the form being a fullscreen with no borders i had to put the
APPLICATION.TERMINATE command in the form's onclick event to terminate the
app.It terminates the app just ok but leaves an empty box on the windows
taskbar, the box disappears when clicked...is this normal?

The delphi help says this way is ok to terminate the app but after getting
about 10-20 small empty boxes on the taskbar when i had to start and stop
the app. many times i get a feeling that something is wrong ;)

I'v also tried the halt command but it gives the same effect...How can i
make sure that there is no empty boxes left in the taskbar when i terminate
the app. with code rather that the crosshair button normally in the form's
titlebar?

--

*

HAL9000: "Dave... Put the Windows disks down... Dave..."

When you make your mark in the world, watch out
for the guys with erasers.

 

Re:Application.terminate not working properly on delphi 4?


Tried that and it still leaves the empty box...

But i noticed that when i run the app. and stop it immediatly it leaves the
empty box, but when i run the app. and when it's running i take my mouse to
the taskbar so that it raises up and then stop the app. it does not leave
the empty box.

Getting kinda funny this one... ;)

Maybe i should move the mouse to the taskbar with code before shutting the
app. down ;)

Thanks for your help,
Asseri Lintanen

Quote

> You are probably setting the forms Width and Height to the size of the
> screen (Screen.Width and Screen.Height) so that it covers the whole
> screen.
> Try this just before you close the form:
>   Width := Screen.Width-1;
>   Height := Screen.Height-1;
> If you are lucky the problem goes away.
> <<<<<<<<

Re:Application.terminate not working properly on delphi 4?


This problem started on my machine with non-Delphi programs after I upgraded
to Win98. Don't know what the bug is but I don't think it's Delphi
particularly. Even some of the standard windows screensavers cause this.

Woody

Quote
Asseri L. <Asseri.Linta...@nojunk.netsonic.fi> wrote in message

news:7orl5r$n27$1@nntp.teliafi.net...
Quote
> Tried that and it still leaves the empty box...

> But i noticed that when i run the app. and stop it immediatly it leaves
the
> empty box, but when i run the app. and when it's running i take my mouse
to
> the taskbar so that it raises up and then stop the app. it does not leave
> the empty box.

> Getting kinda funny this one... ;)

> Maybe i should move the mouse to the taskbar with code before shutting the
> app. down ;)

> Thanks for your help,
> Asseri Lintanen

> > You are probably setting the forms Width and Height to the size of the
> > screen (Screen.Width and Screen.Height) so that it covers the whole
> > screen.
> > Try this just before you close the form:
> >   Width := Screen.Width-1;
> >   Height := Screen.Height-1;
> > If you are lucky the problem goes away.
> > <<<<<<<<

Re:Application.terminate not working properly on delphi 4?


I seemed to get the problem fixed (at least in my case).

It doesn't leave those empty boxes anymore when i also moved the forms top
and left away from the screen border in the following manner :

Quote

form1.left:=100;
form1.top:=100;
form1.width:=100;
form1.height:=100;
application.terminate;

<<<<<<<<<<<<<<

Asseri.

Quote
Woody <woody....@ih2000.net> wrote in message

news:rr33aelbkrl6@corp.supernews.com...
Quote
> This problem started on my machine with non-Delphi programs after I
upgraded
> to Win98. Don't know what the bug is but I don't think it's Delphi
> particularly. Even some of the standard windows screensavers cause this.

> Woody

Re:Application.terminate not working properly on delphi 4?


I thing that's Windows's mistake!

Matija

p.s.: only one another bug in Windows... Anything new???

Other Threads