Timer control is not visible on my main form VB.NET 2017 - 2022

manny cash

Active member
Joined
Oct 19, 2024
Messages
39
Programming Experience
Beginner
Hi guys, once again in here asking for help 'cause I am learning the new Visual Basic, my problem is I have to show date in time in a label, but the Timer control is transparent in my form
there is no way make it visible I need to get the property to set up the counter to 1000. I draw the timer 22 timers onto my main form. So finally I decided to come here and ask for help.
Here is the place this community that I am learning. And I appreciate your help in advance. I am unsure why the timer control is transparent or if there is a way to make it visible.

Thank you so my to all my friends.
 
There is no Timer control. The System.Windows.Forms.Timer class is a component, not a control. Components can be added to a form in the designer and controls are specialised components that inherit the Control class.

That Timer class is basically an alarm clock. You set the Interval, Start it and then it raises its Tick event on that interval. It's basically a way to be able to take an action after a specific period of time, either once or multiple times at regular intervals. It's not going to display anything for you. It's up to you to handle that Tick event ands then display what you want using your own code.

If your intention is to display elapsed time then you should use a Timer and a Stopwatch. You Start both and then get the Elapsed time from the Stopwatch on every Tick event. You can then display that value in a Label or whatever. Note that the Timer can be added to the form in the designer but the Stopwatch will have to be created in code.
 
Back
Top