Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / stoping timers + bitmap

Author
Message
Winston
20
Years of Service
User Offline
Joined: 15th Nov 2004
Location:
Posted: 16th Nov 2004 19:37
Thanks for all the help with the timer but I now have a new problem, how do I make my timer stop just by pressing the spacekey, I can make it stop but it happens when I press any key not just the spacebar.

Also how do I make my bitmap appear in the center of the screen I have set the Left, top, right + bottom co-ordinates but it still apppears in the top left corner (see code) + is it possible to pit text over a picture.
VietDao
20
Years of Service
User Offline
Joined: 30th Oct 2004
Location: Earth, Lovely Earth
Posted: 16th Nov 2004 23:50
Hi,
I don't know why I couldnot open the source code provided by you. But I suggest that:
1. To make the lock stop when pressing the spacebar:

The '...' is the previous code. I just add more codes to stop the clock, the previous code, I think you already got it in the last post about timer.
This will stop the clock when the user press the spacebar and the clock will continue after another key is pressed.
Wait 250 commands is just enough long for the user to put their finger out of the spacebar. If there's no Wait 250, the clock will continue despite a lot of times pressing spacebar from the user, as the loop is so fast. Just try to drop out 1 of the 2 Wait 250 commands and see what happens!
2. Load a bitmap into the bitmapnumber 1 or 2, etc...
Then use Copy bitmap and specify the X, Y coordinate (left, top, right, bottom):
Left = Int((Screen Width$() - Bitmap Width(BitmapNumber)) / 2)
Top = Int((Screen Height$() - Bitmap Height(BitmapNumber)) / 2)
Right = Left + Bitmap Width(BitmapNumber) - 1
Bottom = Top + Bitmap Height(BitmapNumber) - 1
-------------------
That's it. Hope it help,
Bye bye,

Login to post a reply

Server time is: 2024-11-27 14:22:31
Your offset time is: 2024-11-27 14:22:31