1) Sorry ! I still did not understand .. I understood that 'get' and 'set' should be prefixed to certain words to define properties and that we can write our own properties. But in datecontrol.date , where is the 'date' method/property written ?
Read page 21 again, lowercase setxxx gets transformed in to a on xxx, lowercase getxxx get transformed into a read on xxx, so setDate and getDate become read and write on Date. Add a new sub getReadMe and you will see that a new property appears, ReadMe which is Readonly.
3) I have not tried any of the events... But I want to do the following:
I have a list of certain days for a month..
a) As the date control is drawn, only for those days in the list I want to draw some kind of hyperlink OR if possible those days will be in 'different colour' in the date control.
b) When the user will click on that day , it will show some panel with some information ...Now there is a 'btnYear_Click' event and a 'btnMonth_Click' event but I don't know as to 'which event will fire when i press the day in the control'... So...
There are several ways to solve this which is why I asked what have you tried. You have full control over the drawing so drawing text with an underline as a hyperlink should be no problem.
I would imagine that you need to put something in
DrawDays which checks if the day matches your list and instead of doing the
DrawText as written, do whatever you require such as adding the underline, to simulate a hyperlink and changing the color.
For day = 1 To daysInMonth
Dim row As Int = (day - 1 + dayOfWeekOffset) / 7
'Do a check here
cvs.DrawText(day, (((dayOfWeekOffset + day - 1) Mod 7) + 0.5) * boxW, _
(row + 0.5)* boxH + vCorrection, daysFont, DaysInMonthColor , "CENTER")
Next
If you put breakpoints on each of the click events you can see which one is fired and when.
Handle_mouse event deals with clicking on the days.
so you would need to do something around the -
cvsBackground.ClearRect(cvsBackground.TargetRect)
If validDay Then
SelectDay(newSelectedDay)
Hide
End If
I would imagine.
Experiment!
That's the joy of coding...