Okay, I've figured out how to navigate by year, but I need to know how to put a << and >> inside the Calendar class itself (again still using VB) to navigate by year instead of having two external buttons. Anyone have any ideas on how to do this
You cannot add controls to the MonthCalendar itself, it is a built-in native "UserControl" in Windows. You can put your own buttons on top of it though. Make them look like the month scroll buttons and nobody can tell the difference.
Navigating by Year on the Calendar function?
tibballs
Jamie Thomson
wirwin
private void btnNextYear_Click(object sender, EventArgs e) {
DateTime cur = monthCalendar1.SelectionStart;
cur = cur.AddYears(1);
monthCalendar1.SelectionStart = cur;
}
private void btnPrevYear_Click(object sender, EventArgs e) {
DateTime cur = monthCalendar1.SelectionStart;
cur = cur.AddYears(1);
monthCalendar1.SelectionStart = cur;
}
Moved to Windows Forms General forum.
zproxy