So basically, I have a form with a Calendar(frmCalendar) control on it. I have another form that has a DatePicker (frmDatePicker).
frmDatePicker can be opened before frmCalendar would be even created.
What I need to know, is how can I
- Check if the frmCalendar has been opened.
- If it has, how would I get the value of the MonthCalendar(mcUserDate) control?
If you need to know the context, the datePicker is to set the current quarterEnd date for Reports, which are created outside the application.
The calendar is used internally in the application.
It’s a “nice to have” if the DatePicker would default to the currently quarter date chosen in the application (IF it has been chosen).
EDIT
Main Form
| \
| \
frmCalendar frmReports
\
\
frmDatePicker
still easy?
If the forms are both in the same application, I would personaly use property’s. I would have a formOpened property that returns a bool to check if the form has been opened, and I would have a quarterEndingDate property that would return the DateTime from the datePicker.
i.e. in the main Form:
in frmCalender: