Help With Calendar

Adam Brown
02-20-2008, 09:48 AM
Hi,

i need help coding a calendar on visual basic, basically i want to select a date and if its the same date as a date in a text box i want a little picture inserted onto the calendar

Private Sub Text1_Click()
If MonthView1.Value = Text1.Text Then
MonthView1.Select 'i know you cant select the day with this command but this is just an example of what i want'
'i want to then insert a picture onto the day selected'
End If
End Sub

loquin
02-20-2008, 11:00 AM
You want to insert a picture into the Monthview :confused:

if so, THAT's not going to happen... You might be able to do it by subclassing...maybe.

It would be simpler to write your own control. Take a look at this VB Code-based calendar (http://www.xtremevbtalk.com/showthread.php?t=231343) in the code library to get started. It uses a control array of command buttons for the days; you could just as easily use an array of picture boxes...

I believe Flyguy has a calendar example using the flexgrid control; you might be able to adapt it, also. ref Flyguy's Flexgrid Functions (http://www.xtremevbtalk.com/showthread.php?t=35110)

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum