Results 1 to 3 of 3

Thread: Big Calendar? Like Outlook.

  1. #1

    Thread Starter
    Frenzied Member MrGTI's Avatar
    Join Date
    Oct 2000
    Location
    Ontario, Canada
    Posts
    1,277

    Question Big Calendar? Like Outlook.

    Is there a way to make the calendar control look like the Calendar in Outlook?

    I'd like a way to add text to specific days.
    ~Peter


  2. #2
    Fanatic Member Redth's Avatar
    Join Date
    May 2001
    Location
    Ontario, Canada
    Posts
    551
    VB Code:
    1. Sub Calender1_RenderDay(ByVal s As Object, ByVal e As DayRenderEventArgs)
    2.  
    3.     Dim ctlCell As TableCell
    4.     Dim strText As String
    5.  
    6.     strText = "Today is the 15th!"  
    7.  
    8.     If e.Day = 15 Then
    9.         ctlCell = e.Cell
    10.         ctlCell.Controls.Add(New LiteralControl(strText))
    11.     End If
    12.  
    13. End Sub

    Take a look at that Event ... it fires each time it draws a day....

    so, that code should write something on the 15th day...

    From there, you can do other things.. for instance, i made a Calender of Events type thing, that put hyperlinks on each day and those linked to new pages with details of each event... you can easily rig something up to retrieve info from a dataset and put it in the right spots on the calender....

    I was about to make a whole new calender when i stumbled upon this hidden capability of the normal Calender Control.. It sure is a lot easier than making it from scratch, or buying some 3rd party control. There are other events you can look at too to do other things... but this should get the ball rolling for you... btw, i didn't test that code, i just threw it together with my current knowledge.. don't shoot me if it doesn't work..

  3. #3
    Junior Member
    Join Date
    Aug 2001
    Location
    Cali
    Posts
    21

    I don't see that event

    Are you using the regular Microsoft Calendar Control? Because I don't see that event for the control...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width