keep a changing variable accesable over differnet forms

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • metalheadstorm
    New Member
    • Sep 2007
    • 84

    keep a changing variable accesable over differnet forms

    ok my program starts on a log in screen and depending if your a admin or a user u enter your info and click on the relivent button.

    What i want to know is that is it possible to start a timer (i know how to do that)
    then as it switches to a new form when you login the timer still ticks over and say "logintimer " keeps going up by one

    i think this make sence :)

    can somone plz supply some code as this will help loads!

    Thanks.
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    To access the timer on other form use the the formname.timern ame . and don't unload the other form just hide that while you work with second form.

    Comment

    • metalheadstorm
      New Member
      • Sep 2007
      • 84

      #3
      Originally posted by debasisdas
      To access the timer on other form use the the formname.timern ame . and don't unload the other form just hide that while you work with second form.
      formname.timern ame *

      Ah kk ty ill give that a try

      Comment

      • metalheadstorm
        New Member
        • Sep 2007
        • 84

        #4
        ok ive tried every possible way

        the login form with the timer is called "form1"
        the timer is called "timer1"
        the label on the main_menu is called "lblloginti mer"

        can u plz put this in you formname.timern ame format
        cus ive tried every way and it wont work :(

        Comment

        • QVeen72
          Recognized Expert Top Contributor
          • Oct 2006
          • 1445

          #5
          hI,

          IN Form1's Timer1_Timer event write this code :

          frmMainMenu.lbl LoginTimer.Capt ion = Now

          Regards
          Veena

          Comment

          Working...