Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > General > Time in textbox


Reply
 
Thread Tools Display Modes
  #1  
Old 01-13-2003, 11:40 PM
risa risa is offline
Newcomer
 
Join Date: Oct 2002
Location: Philippines
Posts: 23
Default Time in textbox


I just want to know if there's a way to display running time (you can see the changes in seconds, minutes) in a textbox? I want to save the date and time and I want it to be really updated.
I've tried date picker, dtpTime format but it does not change. setting it to Now does not work too.
Should I use Timer? Thanks.
Reply With Quote
  #2  
Old 01-13-2003, 11:55 PM
Robby's Avatar
Robby Robby is offline
Code Factory

Retired Moderator
* Expert *
 
Join Date: Jan 2001
Location: Montreal, Ca.
Posts: 5,565
Default

Yes, set the intervals to 1000, and put Text1.text = Now() in the Timer event of the timer.

I would use a Label instead of a text box, and change the look of the label ro resemble a text box.
__________________
Visit...Bassic Software
Reply With Quote
  #3  
Old 01-13-2003, 11:59 PM
casinglm's Avatar
casinglm casinglm is offline
Centurion
 
Join Date: Oct 2002
Location: Philippines
Posts: 165
Default

Yes, you can use the timer.

something like this:

Code:
Private Sub Timer1_Timer() Label1.Caption = Time End Sub
Reply With Quote
  #4  
Old 01-14-2003, 12:19 AM
risa risa is offline
Newcomer
 
Join Date: Oct 2002
Location: Philippines
Posts: 23
Default

ok thanks. =)
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
 
 
-->