timer

Hello,

I want create an app to reminder the user  abt his appointment(for eg : he has appointment with client 4 pm).So my app should popup a dialogbox at 4pm and remind him abt his appointment.Is it possible to do?. If yes, can some-one help me to do this.

Thanks
beeenaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

aelatikCommented:
' You can do it in many ways, here someting to start with...
' Add a timer control to your form and paste this code :

Private Sub Form_Load()
Timer1.Interval = 1000 ' per second
End Sub

Private Sub Timer1_Timer()
If Hour(Time) & ":" & Minute(Time) = "12:00" Then
MsgBox "It is 12:00 !!!", vbInformation
Timer1.Enabled = False ' app finished his task
End If
End Sub
0
supunrCommented:
Option Explicit

Private Type Appointment
    Description As String
    DateTime As Date
    Flag As Integer ' 0 - waiting, 1 - remind again, 2 - completed
End Type

Private Appointments(100) As Appointment
Private AppointmentsCount As Long

Private Sub Form_Load()
    ' Load all the saved appointments (may be from an dat file or registry)...
End Sub

' Add timer control to the form and set the interval to 1000 (1 sec)
Private Sub Timer1_Timer()
    Dim i As Long

    For i = 0 To AppointmentsCount - 1
        If (Appointments(i).Flag = 0) Then ' not done
            If (Abs(DateDiff("S", Appointments(i).DateTime, Now())) < 2) Then
                ShowMessage Appointments(i)
            End If
        End If
    Next i
End Sub

Private Sub ShowMessage(ByRef msgApp As Appointment)
    ' write your code to show the message
    ' have a non-modal form coming up rather than messagebox
    MsgBox msgApp.Description
    msgApp.Flag = 2 'done
End Sub

Private Sub Form_Unload(Cancel As Integer)
    ' Save all the appointments - because these could have been changed (may be from an dat file or registry)...
End Sub

Hope this will give a start.

Good Luck!
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
supunrCommented:

Yep, simply create an application which has the interface to get appointment details and times.  then you  create the executalbe and make a shortcut to that in the Startup folder.  Then you need a timer to check if the correct time has reached and if so give a reminder.

I am only giving you a possible code to check the time.  It is up to you how you want to get the details of the appointment from the user, etc. (If you need a full program, then increase the points)

(add to previous comment)
0
beeenaAuthor Commented:
Hello supunr
Can you now give me in detail the whole program along with code?
Appreciate your help
Thanks
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.