0

I am struggling to do a project in Visual Basic 2010, I need to make a replication of the New Years Eve ball droping in New York City. The balls has to drop for 30 seconds and can be stoped at any time, it also must include a timer starting from 30 seconds and counting down and must also stop. The ball and timer must be able to stop using the same button. Lastly at the end of the 30 seconds the words Happy New Years must appear on the screen. If someone has an idea of what the code should be please send it to me as soon as you possible can.

Any help would be apperciated.

2
Contributors
1
Reply
4
Views
4 Years
Discussion Span
Last Post by Begginnerdev
0

Create a timer, delclare a public variable with the value of 30 and set the interval to 1000 miliseconds (1 second) then in the timer place the code.

public var as integer = 30

'In the timer.tick event.'

var -= 1
ballLocation = new Point(ballLocation.x, ballLocation.y - 1)

If var = 0 Then
    MsgBox("Happy New Years!")
End If

Fire this code from a start button

timer.Start()

Fire this code from the stop button

timer.Stop()

Edited by Begginnerdev: edit

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.