Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Monthly Calendar in VB.Net
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Visual FoxPro et .NET
Divers
Thread ID:
01025954
Message ID:
01025963
Vues:
14
>What am I doing wrong? Help please. Thanks. I joined a VB.NET forum, but it takes time to get joined and I want to solve this problem ASAP.
>
>I found this example in VB.NET help and put this code in my Calendar control on a form. Problem is whether I choose start date or end date I always get the same date returned for both start and end.
>
>The code follows:
>
>
> Private Sub SelRange()
>        Dim sr As New SelectionRange
>        sr.Start = DateTime.Parse(Me.textBox1.Text)
>        sr.End = DateTime.Parse(Me.textBox2.Text)
>        ' Assign the SelectionRange object to the
>        ' SelectionRange property of the MonthCalendar control.
>        Me.MonthCalendar1.SelectionRange = sr
>    End Sub
>
>    Private Sub monthCalendar1_DateChanged(ByVal sender As Object, _
>    ByVal e As DateRangeEventArgs) Handles MonthCalendar1.DateChanged
>        Me.TextBox1.Text = MonthCalendar1.SelectionRange.Start.Date.ToShortDateString()
>        Me.TextBox2.Text = MonthCalendar1.SelectionRange.End.Date.ToShortDateString()
>
>    End Sub
>
I think everithing is good but you must select the renage when you drag mouse over the dates or keep Shift button and click on First and second date. May be I am totaly wrong because I understand VB.NET as much as chinese but who knows.

BTW There is a pure NET forum here not related at all with VFP. Got Setup your account Click on Forums and Mark NET subscribe.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform