Showing time in textbox ???

Basseman

Member
Licensed User
How on earth do i show the actual time as text and not as messagebox ??

Msgbox (Time (Now)) Shows in Msgbox

But how to implement in a Textbox or as regular Text ???

:sign0104:
 

Cableguy

Expert
Licensed User
Longtime User
Just add a timer to your form, set the timer interval to around 200...
Put these lines in...

Sub Timer1_tick
textbox1.Tetx=Time(Now))
End Sub
 

Basseman

Member
Licensed User
Just add a timer to your form, set the timer interval to around 200...
Put these lines in...

Sub Timer1_tick
textbox1.Tetx=Time(Now))
End Sub


Ghaaa, i must be a total idiot but can't get it to work..
Did as u said, added Timer and set it to 200..
Whats wrong:

Sub Globals
'Declare the global variables here.

End Sub
Sub App_start

Form1.show
label1.FontSize = 32

End Sub



Sub Timer1_Tick

label1.text=Time(Now)

End Sub
 

Cableguy

Expert
Licensed User
Longtime User
Sub Globals
'Declare the global variables here.

End Sub
Sub App_start

Form1.show
label1.FontSize = 32
Timer1.Enabled=True
End Sub



Sub Timer1_Tick

label1.text=Time(Now)

End Sub

You MUST do some researh in the help files...That way you would have noticed that the timer cantrol can be turned off/on
 

klaus

Expert
Licensed User
Longtime User
Do you know that there does exist a help file ?

Timers are used to generate events every measured time.
When a Timer is created its Enabled property is set to false.
To start the Timer, set its Enabled property to true.
Properties and Methods:
Enabled
Interval
Events:
Tick


You must enable the Timer with
Timer1.Enabled = True

Best regards.
 

specci48

Well-Known Member
Licensed User
Longtime User
Ghaaa, i must be a total idiot but can't get it to work..
:sign0012:

What about reading the help file instead of "missreading" other code snipplets?

I cant' see any timer here. Maybe you have added it in the desingner but where do you set the timer value and where do you activate it?

Small hint: The excellent help files could be found here and ind the IDE within the menu "Help".

So a good starting point to your question would be the tickevent.


specci48


Edit: Sorry Cableguy and Klaus: a bit late, but the same intention...
 
Last edited:

Cableguy

Expert
Licensed User
Longtime User
Basic4ppc does not run like you think but as you implement...

:sign0161::sign0188:

OK, lets give the KID some learning space and Time...

Some hints...:
Download some examples...begin with the simple one, usually also the smaller files...They are better to understand....
If you need help with a specific control, try firsty the help from Within the IDE...
If that can't help you, try googling you problem...
If that all fails, then by all means, post you questions....

WE ARE HERE TO HELP EACH OTHER, BUT NO ONE WANTS TO DO THE OTHER ONE'S WORK FOR HIM...

Please don't get us wrong...
We all were at some point,( I still am...) noobs at coding....But by trial and error some question can be found, and with some (read "LOTS") of re-search, most question are answered...
 
Last edited:

Basseman

Member
Licensed User
Sorry will NEVER ask for help again

Sorry, will NEVER ask form help again.
This KID (33yrs) is gone.
:sign0087:
 

Cableguy

Expert
Licensed User
Longtime User
The same way You were "just kidding" with the the "grumpy" comment, I meant no disrespect with the "KID"...
I used it as a replacement for the "noob" wich, for most of us is a bit more ofensive, even if we are Novices at the code subject...

Please do not stop from asking for HELP about Your code....
We are glad to help....
Did you noticed that when you posted an actual "help request", you got some usefull replies?
Even from the likes of me, who was the first to say that no one would do your job for you...But you started your own project and got your first doubt...And we helped...I think...
But for a 33 years old Person...(too scared to say MAN...) you are taking this too personally...
 

Basseman

Member
Licensed User
The same way You were "just kidding" with the the "grumpy" comment, I meant no disrespect with the "KID"...
I used it as a replacement for the "noob" wich, for most of us is a bit more ofensive, even if we are Novices at the code subject...

Please do not stop from asking for HELP about Your code....
We are glad to help....
Did you noticed that when you posted an actual "help request", you got some usefull replies?
Even from the likes of me, who was the first to say that no one would do your job for you...But you started your own project and got your first doubt...And we helped...I think...
But for a 33 years old Person...(too scared to say MAN...) you are taking this too personally...

I'm a hermafrodite....
 

Zenerdiode

Active Member
Licensed User
The Timer should be On by the default one can think........

No, absolutely not. You'll find as your programming develops that timers are phenomally powerfull things and you'll not want them all running when your application starts.

Please understand that programs do not just appear before your eyes. I've got loads of small .sbp files called 'ButtonTest.sbp' 'Timer.sbp' etc. from my earliest days of learning Basic4ppc - and I still refer back to them. You've got to try yourself and use some 'test' type applications - even use the very basic test code thats in the help file. In fact, you'll learn loads about the structure of Basic4ppc from the primary example here.

If you make some effort, reading, trying and testing, when (not if :)) you get stuck, the guys here will be prepared to read through 100s of lines of your code to help you. I speak from first hand experience.
 
Top