[VB.Net]

Discussion in 'Code Snippets and Tutorials' started by singapore, Sep 27, 2010.

  1. singapore

    singapore Level III

    Joined:
    Jan 4, 2010
    Messages:
    554
    Likes Received:
    10
    Hi all. Eh, how do i program a Global timer?

    i.e a timer that can be controlled by both form 1 and form 2.
     
  2. tharoux

    tharoux Level IV

    Joined:
    Dec 30, 2006
    Messages:
    2,733
    Likes Received:
    126
    Location:
    In front of my PC, Montreal
    If the timer is public, just call it using the form name you putted the timer on:

    Code (Text):
    1. form1.timer1.enabled = false
     
  3. singapore

    singapore Level III

    Joined:
    Jan 4, 2010
    Messages:
    554
    Likes Received:
    10
    hmm but how do i declare it as Public?

    changing the Private to Public only allows it to be shared by the entire form and not across the entire program right?
     
  4. Kaden

    Kaden Level I

    Joined:
    Aug 29, 2010
    Messages:
    80
    Likes Received:
    9
    if its like java, then if it is public it can be accessed from anywhere.
    Private means that it can only be accessed within the class that it was created.
     
  5. tharoux

    tharoux Level IV

    Joined:
    Dec 30, 2006
    Messages:
    2,733
    Likes Received:
    126
    Location:
    In front of my PC, Montreal
    ^^this
    I don't have the time to create a small solution to explain it but it shouldn't be a problem.
     
  6. Kaito

    Kaito Level IV

    Joined:
    Jun 29, 2007
    Messages:
    2,692
    Likes Received:
    15
    what's a class? ^^
     
  7. Lightning

    Lightning Administrator
    Staff Member

    Joined:
    Nov 8, 2008
    Messages:
    3,021
    Likes Received:
    195
    Gender:
    Male
    Location:
    Florida, USA
  8. Kaito

    Kaito Level IV

    Joined:
    Jun 29, 2007
    Messages:
    2,692
    Likes Received:
    15
    ah that's the site that i started on. but people said that i should go directly to something neopets specific, instead of learning general programming.
     
  9. Lightning

    Lightning Administrator
    Staff Member

    Joined:
    Nov 8, 2008
    Messages:
    3,021
    Likes Received:
    195
    Gender:
    Male
    Location:
    Florida, USA
    Umm, you kinda have to know general programming before you can do Neopets. Plus you're going to deal with things programming for Neopets that aren't all just browsing and doing stuff on Neo.