Convert Tme to Money

helllo..guys!! i got project from my friend, but i'm confuse when i must
determine time's total in to a few money!!, example : every 15 minute, the money will be raised 1000,- or more explain..this system like parked system..

Comments

  • Use a timer, it raise a event you can capture at whatever you set the interval to, put your logic there.


    ~rlc
  • : helllo..guys!! i got project from my friend, but i'm confuse when i must
    : determine time's total in to a few money!!, example : every 15 minute, the money will be raised 1000,- or more explain..this system like parked system..
    :

    Below the dotted line is the VB.net example of the TIMER function which counts in 1/1000th's of a seconds so 15 minutes = 15*60*1000 as far as the timer function is concerned.

    Start/Stop your timer with TIMER1.Enabled or Timer1.Disabled

    What you need to do is set a variable and add to it every 15 minutes.

    Dim Money as Double=0

    'Every 15 minutes do an addition to the money like>>

    Money=Money+1000

    -----------------------------------------------------

    I'll leave you to try and figure out the timer code part.
    You might be able to say Timer1=0. I don't know.



    Regards,

    Dr M.

    P.S. Type in TIMER in the help part of VB.NET and limit your search to VISUAL BASIC for all the TIMER examples like the one below>>

    ------------------------------------------------------------
    ' Visual Basic
    Private Sub InitializeTimer()
    ' Run this procedure in an appropriate event.
    ' Set to 1 second.
    Timer1.Interval = 1000
    ' Enable timer.
    Timer1.Enabled = True
    Button1.Text = "Enabled"
    End Sub

    Private Sub Timer1_Tick(ByVal Sender As Object, ByVal e As EventArgs) Handles Timer1.Tick
    ' Set the caption to the current time.
    Label1.Text = DateTime.Now
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    If Button1.Text = "Stop" Then
    Button1.Text = "Start"
    Timer1.Enabled = False
    Else
    Button1.Text = "Stop"
    Timer1.Enabled = True
    End If
    End Sub

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories