How to display an image, then at the end of the chosentime, Destroy automatically.

Discussions related to Visual Prolog
Carlos Pereira
VIP Member
Posts: 77
Joined: 30 Jul 2010 7:51

How to display an image, then at the end of the chosentime, Destroy automatically.

Unread post by Carlos Pereira » 22 Nov 2010 19:56

Hello everyone,

Could you please help me again with my project.

Using Photoshop I've created an image with layers displaying the image and other info. When the stand alone prog starts, this image introduction is displayed automatically.

What I would like to do is for the image to show for about 10 seconds and then to automatically Destroy.
I don't know how to programme a routine to hold the image for a specific period and then Destroy itself.

(taskwindow)

Code: Select all

clauses ..... ..... Win = pictWin::new(This), Win:show(), ... (),!. onShow(_)_CreationData):-!.
The above displays the introduction automatically, but it stays put.

Thank you,
Carlos

Gildas Menier
VIP Member
Posts: 78
Joined: 8 Jun 2004 23:01

Unread post by Gildas Menier » 22 Nov 2010 20:32

Hi Carlos,

I suppose you want to use a kind of 'splash screen'. The attached code may help you. It should be unzipped in a vp_extensions folder in your project (vp_extensions\splash). Just create a splash dialog using display(this, "yourimage.bmp", 2000) and it will show and close itself after a few seconds.

Best regards

Gildas
Attachments
splash.zip
(4.28 KiB) Downloaded 280 times

Carlos Pereira
VIP Member
Posts: 77
Joined: 30 Jul 2010 7:51

Unread post by Carlos Pereira » 22 Nov 2010 22:20

Gildas, thank you very much.

It's fantastic.

Carlos

Post Reply