calendar control
|
I have a calendar in an app with 3 month display. How can I tell it to display the current month in the middle (or previous month first) on start up. I don't see any commands to accomplish this without changing the current day.
Edit:
I got it with this:
Code:
Private Sub Calendar_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.Location = My.Settings.CalLoc
Dim thisMonth As New DateTime(DateTime.Today.Year, DateTime.Today.Month, 1)
Dim LastMonth As DateTime
LastMonth = thisMonth.AddDays(-1)
Cal.SetDate(LastMonth)
End Sub
|
Last edited by Amerigo; 06-24-2012 at 05:17 PM.
Reason: Resolved
|