Can't close the compiled and run code window.

Blitz3D Forums/Blitz3D Beginners Area/Can't close the compiled and run code window.

SausageOfDoom(Posted 2004) [#1]
Okay, I'm new to this, so bear with me.

I've just bought and downloaded Blitz Plus and tried a few of the examples that came with the install.

All seems fine except when I want to close the window of the source I just compiled and run. It just won't shut down!!!

For example..

If I load the source for, say Aristoids, then Execute it...the game runs in a newly opened window. When I want to shut that window though, it just won't.

Am I being dim, or wot?

Surely, clicking the "X" close button should do just that?

I'm running Blitz Plus on a P4 1.7Ghz, 512 mb and Windows XP. GeForce II gfx card.

Any ideas, NE1?


Ross C(Posted 2004) [#2]
You try pressing the escape key?

Also, you might want to try and update your copy. I had buggy problems running the examples when i first bought blitzplus :)


SausageOfDoom(Posted 2004) [#3]
Hiya,

I only just downloaded the latest copy that same day.

However, I think it's something to do with the source examples (games) as they seem to be quite old examples that stem from the OLD Blitz2d.

I think the old source files should be removed from the new Blitz Plus package.

Some of the other source examples (in the samples folder) worked fine and terminated properly.


SausageOfDoom(Posted 2004) [#4]
Oh..er... yes, depressing the Escape key (and holding) does work too :)

Thanks :)


Zethrax(Posted 2004) [#5]
With BlitzPlus I think you need to handle the closing of the window (or end the program) yourself when you receive a close window event message. I think that's how it works anyway, it's been a while since I used BlitzPlus.

This is a good thing as it lets you save gadget input data, etc, before the window closes.


Darth Testine(Posted 2004) [#6]
How do you receive/detect a window close event in Blitz-3d?


PowerPC603(Posted 2004) [#7]
I'm afraid there's no close-event in Blitz3D.
Blitz3D doesn't have any events, like BlitzPlus.

The close-button (X) works the same way as the "End"-command (AFAIK).

You don't have to write any code in Blitz3D to make the X-button work.

Try this:

Repeat
	Delay 1
Forever


As you can see, there's no command (or event) which "scans" the close-button, but it works.


BlackD(Posted 2004) [#8]
Sausage - you have to program the close window event manually. For example:

Repeat
If WaitEvent()=$803 Then Exit
Forever

+BlackD


Perturbatio(Posted 2004) [#9]
How do you receive/detect a window close event in Blitz-3d?

to disable close in B3D
to detect close in B3D


DNielsen(Posted 2004) [#10]
@Perturbatio
Nice example you provided. Is there more work-around examples for B3D to simulate BPlus like the one you supplied?


Perturbatio(Posted 2004) [#11]
You can do quite a bit with the win32 API, but there are many things that are just plainly not possible in Blitz3D without lots of third party DLL's.


DNielsen(Posted 2004) [#12]
@Perturbatio
Thanks for the link to the win32 API. I will study that closely