Results 1 to 5 of 5

Thread: [2005] Reminder

  1. #1

    Thread Starter
    Hyperactive Member FireKnox101's Avatar
    Join Date
    Aug 2005
    Location
    Snohomish,Washington
    Posts
    301

    Question [2005] Reminder

    I was going to make a program an i wanted to add, if a user wants to remind them selfs on lets say goto airport to get parents on 7/8/06, When that day came around it will popup a window saying Goto airport to get parents, or what ever the user put. How would i do this???

    Im using VB 2005 Express

    Im currently using: VB.NET 2003, And VB 2005 Express
    My Projects
    Form Them Show Keypress In App
    Simple Ping Control

  2. #2
    Frenzied Member
    Join Date
    Jul 2005
    Posts
    1,521

    Re: [2005] Reminder

    Well there are multiple aspects to this, so can you be a little more specifc on what you need help with?

    But a general how to do this would be this:
    You need some way to store the reminders, xml file, text file, database. There are numerous options for that.

    Then you'll need a timer to check if it is time to remind. You could create a timer for every reminder. You could have one timer for all reminders.

    If you have one timer you are going to need a shorter interval so you don't miss a reminder. If you have a timer for every reminder you can set the timer to the length of time until the reminder (assuming the timer can be set for that length of time).
    Visual Studio Team Edition 2005
    GDI+ Links: Bob Powell VB.Net Heaven
    API Links: All API Pinvoke.Net
    VB6 to VB.Net: Visual Basic 6 to .NET Function Equivalents (Thread)

  3. #3
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: [2005] Reminder

    You will also need the process to be running constantly in the background.

  4. #4
    Admodistrator |2eM!x's Avatar
    Join Date
    Jan 2005
    Posts
    3,900

    Re: [2005] Reminder

    Heres the code I wrote for a similar app

    VB Code:
    1. Option Strict On
    2. Option Explicit On
    3.  
    4. Public Class Form1
    5.     Dim WeeklyBasis As New Specialized.StringCollection
    6.     Dim DailyBasis As New Specialized.StringCollection
    7.  
    8.     Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
    9.         Me.NotifyIcon1.Dispose()
    10.     End Sub
    11.  
    12.     Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    13.         ReadSettings()
    14.         Timer1.Start()
    15.         With Me.NotifyIcon1
    16.             .Icon = Me.Icon
    17.             .Visible = True
    18.         End With
    19.     End Sub
    20.  
    21.     Private Sub ReadSettings()
    22.         Dim MyXml As New Xml.XmlDocument
    23.         Dim XmlNode As Xml.XmlNode
    24.         Dim Weekly As Xml.XmlNode
    25.         Dim Daily As Xml.XmlNode
    26.         MyXml.Load(Application.StartupPath & "\settings.xml")
    27.         For Each Node As Xml.XmlNode In MyXml.ChildNodes
    28.             If Node.Name = "xml" Then
    29.                 XmlNode = Node
    30.                 Exit For
    31.             End If
    32.         Next
    33.         For Each tnode As Xml.XmlNode In XmlNode.ChildNodes
    34.             Select Case tnode.Attributes("name").Value
    35.                 Case "DailyBasis"
    36.                     Daily = tnode
    37.                 Case "WeeklyBasis"
    38.                     Weekly = tnode
    39.             End Select
    40.         Next
    41.  
    42.         For Each Node As Xml.XmlNode In Daily.ChildNodes
    43.             DailyBasis.Add(Node.Attributes("name").Value & "|" & (Node.Attributes("time").Value) & "|" & Node.Attributes("date").Value)
    44.         Next
    45.  
    46.         For Each node As Xml.XmlNode In Weekly.ChildNodes
    47.             WeeklyBasis.Add(node.Attributes("name").Value & "|" & (node.Attributes("time").Value) & "|" & node.Attributes("date").Value)
    48.         Next
    49.     End Sub
    50.  
    51.     Private Sub Timer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles Timer1.Tick
    52.         For i As Int32 = 0 To WeeklyBasis.Count - 1
    53.             Dim Values() As String = WeeklyBasis(i).Split("|"c)
    54.             If Values(2) = Date.Now.DayOfWeek.ToString AndAlso Values(1).Substring(0, Values(1).IndexOf(":")).ToString = Math.Abs(Convert.ToInt32(Date.Now.TimeOfDay.Hours) - 12).ToString Then
    55.                 NotifyIcon1.ShowBalloonTip(100, "Reminder!", Values(0), ToolTipIcon.Info)
    56.             End If
    57.         Next
    58.  
    59.         For i As Int32 = 0 To DailyBasis.Count - 1
    60.             Dim Values() As String = DailyBasis(i).Split("|"c)
    61.             If Values(2) = Date.Now.ToShortDateString AndAlso Values(1).Substring(0, Values(1).IndexOf(":")).ToString = Math.Abs(Convert.ToInt32(Date.Now.TimeOfDay.Hours) - 12).ToString Then
    62.                 NotifyIcon1.ShowBalloonTip(100, "Reminder!", Values(0), ToolTipIcon.Info)
    63.             End If
    64.         Next
    65.     End Sub
    66.  
    67. End Class

    Add a timer, and a notifyicon.

    Download the attachment that will store the dates and stuff, works like a charm
    Attached Files Attached Files

  5. #5

    Thread Starter
    Hyperactive Member FireKnox101's Avatar
    Join Date
    Aug 2005
    Location
    Snohomish,Washington
    Posts
    301

    Re: [2005] Reminder

    Ok, is there a way to write to Settings.xml file, with in the program?

    Im currently using: VB.NET 2003, And VB 2005 Express
    My Projects
    Form Them Show Keypress In App
    Simple Ping Control

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width