Hey Guys,

Ive made a settings form for my latest StopWatch project. The stopwatch also includes a countdown timer.

To set the time to countdown from, ive made a settings form in which you can enter a value into a textbox and when you start the countdown, it reads the value from the textbox and counts down from that value.

Everything is fine when the countdown time is displayed on the same form as the countdown timer itself, but when I put this textbox onto a new form, and edit the code appropriately the timer doesnt seem to pick up that the countdown time has changed.

Does anyone have any ideas?

Check your Timer Enable Properties.
Make sure that is set to True, also check for Timer Interval is not 0.

Sorry but i think you've missed a part of my first post.

I require the timer.interval to be the value from another form.

-

But it doesnt matter anyway now, ive solved it using my.settings.

Member Avatar for Unhnd_Exception

You should look into storing the variable in a module or a shared variable in another form or class. my.settings would be intended to store the value so the next time the app is openend it would still be there. If thats not needed then store it another way.

Public Module AppSettings
public CountDownValue as integer
End Module

Public Class FormWhatever
public shared CountDownValue as Integer
End Class

They are the same.

To access

AppSettings.CountdownValue

'No intialization required to access the shared variable in the form
FormWhatever.CountdownValue

To be honest, eventually I will make it store the data, but thanks, ill look into storing it in a module, as there are things I havent made yet which I plan to just be stored during the application is running.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.