Click here to Skip to main content
15,891,943 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Timer set time click Pin
Bob Beaubien3-Sep-09 2:49
Bob Beaubien3-Sep-09 2:49 
GeneralRe: Timer set time click Pin
Johan Hakkesteegt3-Sep-09 3:31
Johan Hakkesteegt3-Sep-09 3:31 
GeneralRe: Timer set time click Pin
Bob Beaubien3-Sep-09 3:40
Bob Beaubien3-Sep-09 3:40 
GeneralRe: Timer set time click [modified] Pin
Bob Beaubien3-Sep-09 15:15
Bob Beaubien3-Sep-09 15:15 
GeneralRe: Timer set time click Pin
Johan Hakkesteegt3-Sep-09 20:12
Johan Hakkesteegt3-Sep-09 20:12 
GeneralRe: Timer set time click [modified] Pin
Bob Beaubien4-Sep-09 4:32
Bob Beaubien4-Sep-09 4:32 
GeneralRe: Timer set time click Pin
Johan Hakkesteegt6-Sep-09 20:05
Johan Hakkesteegt6-Sep-09 20:05 
GeneralRe: Timer set time click Pin
TheComputerMan4-Sep-09 9:59
TheComputerMan4-Sep-09 9:59 
Johan is correct of course. I was giving you the quick answer!

The time, depending on whether it is always fixed or may change can either be in the tick event (if the value is never going to change), or as a user setting (if the user can change it), or as some other module level variable which is set on form load etc etc.

Private Sub Timer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles Timer1.Tick
    Dim tmeFireAt as Date = "01:30"

    If TimeValue(Now) = tmeFireAt Then	
        'Or whatever checking you feel you need to see if the time has been reached Hour() Minute() Second()  etc etc
        Timer1.Enabled = False
        '
        'do stuff
        '
        Timer1.Enabled = True
    End If
End Sub

Private tmeFireAt as Date = "01:30"

'
'
'
Private Sub Timer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles Timer1.Tick
    If TimeValue(Now) = m_tmeFireAt Then	
        'Or whatever checking you feel you need to see if the time has been reached Hour() Minute() Second()  etc etc
        Timer1.Enabled = False
        '
        'do stuff
        '
        Timer1.Enabled = True
    End If
End Sub


Private Sub Timer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles Timer1.Tick
    If TimeValue(Now) = My.Settings.FiringTime Then	
        'Or whatever checking you feel you need to see if the time has been reached Hour() Minute() Second()  etc etc
        Timer1.Enabled = False
        '
        'do stuff
        '
        Timer1.Enabled = True
    End If
End Sub

GeneralRe: Timer set time click Pin
Bob Beaubien5-Sep-09 2:39
Bob Beaubien5-Sep-09 2:39 
AnswerRe: Timer set time click Pin
Ashfield3-Sep-09 1:34
Ashfield3-Sep-09 1:34 
GeneralRe: Timer set time click Pin
Bob Beaubien3-Sep-09 2:50
Bob Beaubien3-Sep-09 2:50 
GeneralRe: Timer set time click Pin
Ashfield3-Sep-09 3:33
Ashfield3-Sep-09 3:33 
Questioninsert excel worksheet also apply the excel formula in vb.net Pin
newdbo2-Sep-09 21:30
newdbo2-Sep-09 21:30 
AnswerRe: insert excel worksheet also apply the excel formula in vb.net Pin
Bob Beaubien2-Sep-09 21:49
Bob Beaubien2-Sep-09 21:49 
AnswerRe: insert excel worksheet also apply the excel formula in vb.net Pin
TheComputerMan2-Sep-09 22:33
TheComputerMan2-Sep-09 22:33 
GeneralRe: insert excel worksheet also apply the excel formula in vb.net Pin
valkyriexp3-Sep-09 14:04
valkyriexp3-Sep-09 14:04 
QuestionAdding controls to Existing Panel at run time in windows application Pin
kjsl2k92-Sep-09 19:16
kjsl2k92-Sep-09 19:16 
AnswerRe: Adding controls to Existing Panel at run time in windows application Pin
Muhammad Mazhar2-Sep-09 19:48
Muhammad Mazhar2-Sep-09 19:48 
GeneralRe: Adding controls to Existing Panel at run time in windows application Pin
kjsl2k92-Sep-09 19:58
kjsl2k92-Sep-09 19:58 
GeneralRe: Adding controls to Existing Panel at run time in windows application Pin
Dave Kreskowiak3-Sep-09 6:41
mveDave Kreskowiak3-Sep-09 6:41 
QuestionPlease help with Inserting value from DataGrid in Database Table Pin
Hammad Mansoor2-Sep-09 19:00
Hammad Mansoor2-Sep-09 19:00 
AnswerRe: Please help with Inserting value from DataGrid in Database Table Pin
TheComputerMan2-Sep-09 22:22
TheComputerMan2-Sep-09 22:22 
GeneralRe: Please help with Inserting value from DataGrid in Database Table Pin
Hammad Mansoor2-Sep-09 22:38
Hammad Mansoor2-Sep-09 22:38 
GeneralRe: Please help with Inserting value from DataGrid in Database Table Pin
TheComputerMan2-Sep-09 23:08
TheComputerMan2-Sep-09 23:08 
GeneralRe: Please help with Inserting value from DataGrid in Database Table Pin
Johan Hakkesteegt3-Sep-09 2:40
Johan Hakkesteegt3-Sep-09 2:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.