Showing time in textbox ???

Discussion in 'Questions (Windows Mobile)' started by Basseman, Jan 11, 2009.

  1. Basseman

    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:
     
  2. taximania

    taximania Well-Known Member Licensed User

    label1.text=time(now)
    form1.refresh
     
  3. Basseman

    Basseman Member Licensed User


    Thanx, but it only shows what the time is when i start the app and not updating it.

    Will try to solve it by myself but some hints whould be nice =)
     
  4. Cableguy

    Cableguy Expert 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
     
  5. Basseman

    Basseman Member Licensed User


    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
     
  6. Cableguy

    Cableguy Expert Licensed User

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

    klaus Expert Licensed 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.
     
  8. Basseman

    Basseman Member Licensed User


    The Timer should be On by the default one can think........
     
  9. specci48

    specci48 Well-Known Member Licensed User

    :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: Jan 11, 2009
  10. specci48

    specci48 Well-Known Member Licensed User

    Basic4ppc does not run like you think but as you implement...
     
  11. Cableguy

    Cableguy Expert Licensed User

    :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: Jan 11, 2009
  12. Basseman

    Basseman Member Licensed User

    Sorry will NEVER ask for help again

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

    Cableguy Expert 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...
     
  14. Basseman

    Basseman Member Licensed User

    I'm a hermafrodite....
     
  15. Zenerdiode

    Zenerdiode Active Member Licensed User

    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.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice