Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

[VB.NET] MinuteTimer [Timer from ms to minutes]

A minute timer is a timer that allows you to have the interval in
minutes instead of milliseconds.
Such as.

Code
Timer1.Interval = 60000 ' 1 Minute
is now
Code
MinuteTimer1.Interval = 1 ' 1 Minute

Enter this code into your project
in a new class.
Code
Public Class MinuteTimer
    Inherits System.Windows.Forms.Timer

    Private _Minutes As Integer = 0

    Public Shadows Property Interval() As Integer
        Get
            Return _Minutes
        End Get
        Set(ByVal value As Integer)
            If value < 0 Then value = 0
            _Minutes = value
            Try
                MyBase.Interval = _Minutes * 60000
            Catch : Throw
            End Try
        End Set
    End Property

End Class
[IMG]http://i27.[censored].com/30wqasg.jpg[/IMG]

Save your project, Build your project, Then look at the top
You will see a component called "MinuteTimer"
[IMG]http://i30.[censored].com/fmupvs.jpg[/IMG]

Coding them MinuteTimer1 is the same as a real timer,
Except the Milliseconds to Minutes and instead of
just Timer1 It's MinuteTimer1.

Code
MinuteTimer1.Interval = 5 ' 5 Minutes
Hey, this is good. First time i've ever seen someone post a component here. keep 'em coming.
Thanks for the good feedback.
As I said above, This is a great component for using long timed timers
in projects that don't want to do functions every 2 minutes or less.
or trying to figure out your milliseconds and looping it to be more than 65000ms.
lol ... nice ...
i even don't know that ...

Thanks !
Yeah, There are a bunch of things people can do in vb2008 that people don't know
don't use or don't learn, and to be honest, A lot of them are pretty cool.
thanks mate, used a little project of mine
Borderline master Web/PHP Developer
Greatly Skilled C++ Developer
With a minor in design
Well, The-Raven, Lets call it eve, Because I stole that banner thing
out of your sig and put it in mine. :P


Possibly Related Threads...
Thread / Author Replies Views Last Post
[.NET] by Iera NamhorunOct 6, 2018 06:28 PM 4 228 Oct 6, 2018 06:28 PM
Last Post: 0xDEAD10CC
[Shell] by Elite Hacker 69Dec 24, 2015 04:46 PM 3 283 Dec 24, 2015 04:46 PM
Last Post: b00st3d
[.NET] by xVipXMay 23, 2015 08:08 AM 4 192 May 23, 2015 08:08 AM
Last Post: xVipX