Hi,
I am stuck trying to reuse the calendar or the date time class in visual basic I can not find a way to reset the former settings. Is it just me or is there a way to accomplish this task. Any help would be appreciated. I feel it is a simple program to concieve but unfortunatly I have not been able to find a resolution to the situation.I was up till 3 am trying to find a solution so I hope I have not messed up my code to much lol.
Inline Code Example Here
Public Class frmCalendar

Public Shared _strFutureReminders As String




Private Sub Calendar_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
    ' This Code enters todays date into the Todays Date Label
    lblTodaysDate.Text = My.Computer.Clock.LocalTime.ToLongDateString



End Sub


'above is the main calendar page when I go back to it and return to the editing page the calendar will not aknowlege the change of date?

Public Class frmEditor

Public Shared _intArraySize As Integer = 364I

Public Shared _dtmReminderDate(_intArraySize) As String

Public Shared _strDailyReminders(_intArraySize) As String
Dim _strDailyReminderInput As String
Dim _intCurrentReminderIndex As Integer
Public Shared _intRecordedIndexCount(_intArraySize) As Integer
Dim _Count As Integer = 0
Public Shared _dtmCurrentReminderDate As Date

Private Sub frmEditor_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load





    ' records and displays the users selected date
    _dtmCurrentReminderDate = frmCalendar.datMain.Text
    lblEditingDate.Text = _dtmCurrentReminderDate.ToShortDateString


End Sub

Private Sub btnCalendarReturn_Click(sender As System.Object, e As System.EventArgs) Handles btnCalendarReturn.Click

    Me.Hide()
    frmCalendar.Show()
End Sub

Private Sub btnClear_Click(sender As System.Object, e As System.EventArgs) Handles btnClear.Click

End Sub

Private Sub btnEdit_Click(sender As System.Object, e As System.EventArgs) Handles btnEdit.Click

    RecordReminders()

End Sub

Public Sub RecordReminders()

    ' Recieves the data from the user and places it in the arrays

    _strDailyReminderInput = InputBox("Please enter the Reminders (Schedule) for " & _
                                      _dtmCurrentReminderDate.ToShortDateString(), "Input Box")
    _intRecordedIndexCount(_Count) = 0

    _dtmReminderDate(_Count) = _dtmCurrentReminderDate

    _strDailyReminders(_Count) = _strDailyReminderInput

    _intRecordedIndexCount(_Count) = _Count

    _Count += 1

    DisplayEditReminder()

End Sub

Public Sub DisplayEditReminder()



    For count As Integer = 0 To (_Count - 1)
        If _dtmReminderDate(count) = _dtmCurrentReminderDate Then
            lstEditorReminders.Items.Add(_strDailyReminders(count))
        Else
            MsgBox("Sorry there are no reminders for " & _dtmCurrentReminderDate _
                   & "Please insert the Reminder information", MsgBoxStyle.DefaultButton1, "User Message")
        End If



    Next

End Sub

End Class

As I have stated I may have made a big mistake by trying to change the calendar into a date time object.
any insight into my mistake would be greatly appreciated.
Thank You,
C.D.

Private Sub btnOpenEditor_Click(sender As System.Object, e As System.EventArgs) Handles btnOpenEditor.Click
    ' This code hides the Calendar Window and opens the Editor window
    Me.Hide()
    frmEditor.Show()
End Sub


Private Sub btnClearReminders_Click(sender As System.Object, e As System.EventArgs) Handles btnClearReminders.Click
    lstReminders.Items.Clear()
End Sub

Private Sub btnInsertReminders_Click(sender As System.Object, e As System.EventArgs) Handles btnInsertReminders.Click
    frmCalendar._strFutureReminders = InputBox("Please enter the information for the REMINDER ", "Input Window")
    lstReminders.Items.Add(frmCalendar._strFutureReminders)

End Sub

End Class

This article has been dead for over six months. Start a new discussion instead.