Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > General > Monthview - today variable?


Reply
 
Thread Tools Display Modes
  #1  
Old 03-04-2002, 02:57 PM
kkonkle kkonkle is offline
Centurion
 
Join Date: Mar 2002
Location: Michigan
Posts: 186
Default Monthview - today variable?


I am using a monthview object in my form and I have two text boxes to represent a date range that the user will be able to select. What I want is for the current date to be displayed in both the text boxes. I can physically put the current date into the monthview.value, but then tomorrow I will just have to change it again. On the monthview calendar the current date is circled in red, so there must be something that knows the current date. I want to take that variable and put it into my text boxes. Does anyone know how to access that? Thanks.

/<evin
Reply With Quote
  #2  
Old 03-04-2002, 03:05 PM
Volte's Avatar
Volte Volte is offline
Ultimate Contributor

Retired Leader
* Guru *
 
Join Date: Aug 2001
Posts: 5,344
Default

You can use the Date variable to return the current date. Time returns the time. Now returns both together.
Reply With Quote
  #3  
Old 03-04-2002, 03:08 PM
xxxxxq
Guest
 
Posts: n/a
Default Month View

If memory serves me correct it goes a little something like this:

with monthview
.month = month(now)
.day = day(now)
.year = year(now)
end with

that should be thrown at the form load event. You may need to check the functions but i think they are right (sorry didn't have the luxury of a vb editor when posting).

Hope that helps.
Reply With Quote
  #4  
Old 03-04-2002, 03:14 PM
kkonkle kkonkle is offline
Centurion
 
Join Date: Mar 2002
Location: Michigan
Posts: 186
Default Thank you

Thank you VolteFace. I was able to make it work with "Date" quite easily by making a puiblic function called SetDate that is called on the Form_Load() event with the following:

Public Function setDate()
calDate.Value = Date

txtOne.Text = Date
txtTwo.Text = Date
End Function

I just need a good reference book...

/<evin
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->