Is there a way to get the x/y coordinates of a date on the monthcalendar control? I'm wanting to create a custom calendar that can X out dates, but I need the coordinates to paint of the date. Right now I'm using this:
I'm thinking that if I could it would be getting it from the SelectionStart. That's why I have it in the loop. I'm up for any suggestions.
visual basic.net Code:
Protected Overloads Sub OnPaint(ByVal e As PaintEventArgs) MyBase.OnPaint(e) 'dateList is a list(of dates) 'xFontColor is a color that's set in the properties Dim g As Graphics = e.Graphics Dim cross As String = "X" Dim brushColor As New SolidBrush(xFontColor) For Each dates As Date In dateList Me.SelectionStart = dates g.DrawString(cross, xfont, brushcolor, x, y) Next End Sub
I'm thinking that if I could it would be getting it from the SelectionStart. That's why I have it in the loop. I'm up for any suggestions.