Results 1 to 11 of 11

Thread: MSCAL (VB6)

  1. #1
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    MSCAL (VB6)

    After using MSCAL.OCX for a few days now, I'm going to trash it out of my application.

    Run-time errors and the such have convinced me of the in-efficienct of this control.

    Does another control exist, or an add-in which I can implement which is not ActiveX,OCX ?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: MSCAL (VB6)

    The first alternative is the Date and Time Picker, but that is also an ActiveX control (in mscomct2.ocx.) You would have to create a calendar form using built-in VB6 controls only - or find an existing one, but a search didn't turn up anything useful. Perhaps there is a Lounger who has done something like this?

  3. #3
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: MSCAL (VB6)

    Thanks Hans

    I Googled extensively and didn't come back with anything useful.
    Date & Time Picker ! I remember using that in my database !!

    Are there any known issues after P&Deploy that you know of ?

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: MSCAL (VB6)

    I'll have to leave that question to others...

  5. #5
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: MSCAL (VB6)

    Ok
    Thanks for the help anyway.

    Have a good weekend

  6. #6
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: MSCAL (VB6)

    Another alternative is the monthview control, which is what we use for a calendar in VBA.
    Charlotte

  7. #7
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: MSCAL (VB6)

    Thanks Charlotte.

    I just came accross this little gem while browsing, it may be of use to others so thought I would include
    it in the post.

    I'm sure I can do something with it in my project:

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: MSCAL (VB6)

    Good find! Thanks for sharing it.

  9. #9
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: MSCAL (VB6)

    Glad to give something back.

    With the calendar, can the <pre>m_oCalendar_DateClicked</pre>

    routine be changed:

    I wouldn't want multiple dates for this particular form, so I would like to remove the lstDates and
    replace it with a text "txtDateSelected" but the routine looks like it is looping through an array.

    Would this be easily changed ?

  10. #10
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: MSCAL (VB6)

    This calendar allows you to select multiple dates if the MultiSelect property is True, hence the loop through a collection. Try this instead:

    Private Sub m_oCalendar_DateClicked(ByVal Button As Integer, ByVal dtDateClicked As Date, iPos As Integer)
    'put the selected date in a text box
    txtDateSelected.Text = Format(m_oCalendar.SelectedDays.Item(1).DateTime, "dd Mmm YYYY")
    End Sub

    Warning: air code, I don't have VB6 at my disposal at the moment.

  11. #11
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: MSCAL (VB6)

    This seems to work:-

    <pre>txtDateSelected.Text = Format((dtDateClicked), "dd Mmm YYYY")</pre>


Posting Permissions

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