how do i use Windows Calander function?

i am writing a type of calander program where i can enter information on specific days. basiclly a daily planner type thing, i want to use the windows calander so i can get all the correct days (leap year and everything)...
any help would be greatly appreciated...
thank you,
bruce

Comments

  • : i am writing a type of calander program where i can enter information on specific days. basiclly a daily planner type thing, i want to use the windows calander so i can get all the correct days (leap year and everything)...
    : any help would be greatly appreciated...
    : thank you,
    : bruce
    :

    I believe there is a calendar control you can use but I can't remember where to get it.

    You can use simple math to determine if it's a leap year or not.

    [code]If (YearNum And 3) = 0 Then
    'Year is divisible by 4, check for 100's exception
    If YearNum Mod 100 = 0 Then
    'If divisible by 100, it must be divisible by 400
    If YearNum Mod 400 = 0 Then
    'Leap year!
    Else
    'Not a leap year
    End If
    Else
    'Leap year!
    End If
    Else
    'Not a leap year
    End If
    [/code]
    Other than that, VB's date functions can give you most anything you want to know...
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion