Re: vb 6 MonthView control

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance




"WB" <none> wrote in message news:uf0cqaioHHA.5008@xxxxxxxxxxxxxxxxxxxxxxx
I am trying to implement the monthview control and am having difficulty
with
the months that are displaying when the form loads the control.

I want one column with three months. So if I were loading it today the
months would be May, June, July. The scrollrate is set at zero. If I
change my system date to June, May is still the first month that shows.
It
isn't until I set my system date to August that May no longer appears.

I always want the current month to be the top(first) month. Is this
possible?


It doesn't look like there's any property that lets you specify this and I
didn't see any API message you could possibily send. The Monthview appears
to be "smart" in that if the date assigned to Value is within the range of
displayed months, it doesn't change the view. You can force it by
inititally setting a date way in the future and then setting the desired
date. For example:

Private Sub Form_Load()

MonthView1.Value = DateSerial(2100, 12, 31)
MonthView1.Value = Date

End Sub

I just picked the year 12/31/2100 arbitrarily. I'm guessing your program
won't be in use by that date. <g> Of course, if you've set the MaxDate to
something earlier than this 12/31/2100, be sure to change one of them.

--
Mike
Microsoft Visual Basic MVP


.



Relevant Pages

  • Re: vb 6 MonthView control
    ... the months that are displaying when the form loads the control. ... didn't see any API message you could possibily send. ... inititally setting a date way in the future and then setting the desired ... Private Sub Form_Load ...
    (microsoft.public.vb.controls)
  • Re: Problem selecting printer
    ... You can overcome these problems by using the equivalent API method of displaying a print dialog. ... This is a DLL which was produced by Microsoft presumably because of the device name length problem and also the various memory related problems they would also have been having with the code example I have just described. ... Private Sub Command1_Click ... Then in your main Form add one CommandButton and use the IDE properties window to set its name to cmdSelectPrinter. ...
    (microsoft.public.vb.general.discussion)
  • RE: combo box code?
    ... Private Sub Combo0_Change ... Set objRS = CurrentDB.Execute ... > thought that if I put a combo box on my results form displaying the record id ... >> list boxes, etc? ...
    (microsoft.public.access.modulesdaovba)
  • Re: WEB Browser Control
    ... the WebBrowser Control on an Excel sheet). ... For Each IElem In WebDoc.forms.elements ... >Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As ...
    (microsoft.public.excel.programming)
  • Re: Form scroll bar
    ... When grading students computer applications work, ... displaying checkmarks, the second displaying the point values and the ... checkmarks; click on a displayed checkmark to make them disappear. ... Private Sub MSFlexGrid1_Click ...
    (microsoft.public.vb.general.discussion)