vb.net help....................

nuni

Member
Feb 5, 2009
277
24
0
Colombo
All you need is a timer :)

In your timer event.

dim theTime as datetime

theTime = CDate(txtTime.Text)

if theTime.hour = now.hour and theTime.minute = now.minute then
'Form open code HERE :)
end if
 
Last edited:
  • Like
Reactions: ad.hasareli

nuni

Member
Feb 5, 2009
277
24
0
Colombo
theTime = CDate(txtTime.Text)

Ithin machang methanin set karaganin. txtTime.text eka initialize karapang 4 ta (24hr clock ekata). Cdate eken eka convert karala theTime variable ekata date widiyata daagannawane. if eken 4 unama timer eka digatama run wena nisa 4 ta form eka load karapang. mage gawa danata visual studio na bang. mobile eken danne.
 

prosoft

Member
Oct 21, 2006
11
10
3
Answer

Hi, I'll not going to give the code, but I'll tell you how to do it coz I can't remember VB coding since I'm doing c# now. Normally you have to run a separate program or same program in background(should be not visible). in the initializing method or loading method you can use
this.visible = false(someting like this)

after that create a timer and attach the tick event and inside that event chk for the time(if you don't know you can google it)

in that if condition if the time is 4.00pm set the forms visiblity to true.

simple as that. tell me if u have any concerns or problems
 
  • Like
Reactions: ad.hasareli

ad.hasareli

Well-known member
  • Mar 27, 2010
    5,264
    580
    113
    දකුනේ කොල්ලෙක්
    Hi, I'll not going to give the code, but I'll tell you how to do it coz I can't remember VB coding since I'm doing c# now. Normally you have to run a separate program or same program in background(should be not visible). in the initializing method or loading method you can use
    this.visible = false(someting like this)

    after that create a timer and attach the tick event and inside that event chk for the time(if you don't know you can google it)

    in that if condition if the time is 4.00pm set the forms visiblity to true.

    simple as that. tell me if u have any concerns or problems


    All you need is a timer :)

    In your timer event.

    dim theTime as datetime

    theTime = CDate(txtTime.Text)

    if theTime.hour = now.hour and theTime.minute = now.minute then
    'Form open code HERE :)
    end if


    theTime = CDate(txtTime.Text)

    Ithin machang methanin set karaganin. txtTime.text eka initialize karapang 4 ta (24hr clock ekata). Cdate eken eka convert karala theTime variable ekata date widiyata daagannawane. if eken 4 unama timer eka digatama run wena nisa 4 ta form eka load karapang. mage gawa danata visual studio na bang. mobile eken danne.



    help karapu hemotama thnxxxxxxxxx rep+++ :yes:
     

    WebDeveloper

    Member
    Aug 14, 2012
    27
    1
    0
    menna code eka

    mulinma machan thawa form ekak hada ganin. (form2) eta passe form 1 eken form 2 eke visible eka true false karanna puluwan. form1 ekata timer ekak dala me code eka type karanna.
    /****************************************************/
    Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Form2.Visible = False
    Timer1.Enabled = True
    Timer1.Start()
    End Sub


    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
    If DateTime.Now.Hour = 23 Then
    If DateAndTime.Now.Minute = 9 Then
    Form2.Visible = True
    End If
    End If

    End Sub
    End Class
    /******************************************************/

    23, 9 wenuwata ube time eka dapan. natham ewata textbox ekakin values enter karanna hadanna puluwani.
    :D:D:Dfully tested.:D:D:D
     
    Last edited:
    • Like
    Reactions: ad.hasareli

    smother

    Well-known member
  • Jan 27, 2009
    19,902
    1,483
    113
    36
    Six Feet Under
    why don't you try schedule task ?

    Create the exe and use windows schedule task,to execute it anytime as you need.
     
    Last edited:

    ad.hasareli

    Well-known member
  • Mar 27, 2010
    5,264
    580
    113
    දකුනේ කොල්ලෙක්
    mulinma machan thawa form ekak hada ganin. (form2) eta passe form 1 eken form 2 eke visible eka true false karanna puluwan. form1 ekata timer ekak dala me code eka type karanna.
    /****************************************************/
    Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Form2.Visible = False
    Timer1.Enabled = True
    Timer1.Start()
    End Sub


    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
    If DateTime.Now.Hour = 23 Then
    If DateAndTime.Now.Minute = 9 Then
    Form2.Visible = True
    End If
    End If

    End Sub
    End Class
    /******************************************************/

    23, 9 wenuwata ube time eka dapan. natham ewata textbox ekakin values enter karanna hadanna puluwani.
    :D:D:Dfully tested.:D:D:D


    thnxxxx a lot machan rep +++