Results 1 to 8 of 8

Thread: timer w/ button

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2010
    Posts
    4

    Unhappy timer w/ button

    Dear Friends,

    Please help me how to create a button autoclick every 2 sec.
    thank you all

    God Bless

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: timer w/ button

    Welcome to the forums.

    Why do you want to do this?

  3. #3
    Fanatic Member
    Join Date
    Aug 2010
    Posts
    624

    Re: timer w/ button

    Guess it's some sort of automated clicking for a game perhaps? Something that requires a large amount of clicking in a short amount of time. Alternately, it could be used to cheat your way to a really high clickcount on one of those facebook games
    If I helped you out, please take the time to rate me

  4. #4

    Thread Starter
    New Member
    Join Date
    Oct 2010
    Posts
    4

    Re: timer w/ button

    Quote Originally Posted by Hack View Post
    Welcome to the forums.

    Why do you want to do this?
    because a create a chat program that have a refresh button and i want the refresh button automatic click every 2 seconds. thank

    God Bless

  5. #5

    Thread Starter
    New Member
    Join Date
    Oct 2010
    Posts
    4

    Re: timer w/ button

    Quote Originally Posted by J-Deezy View Post
    Guess it's some sort of automated clicking for a game perhaps? Something that requires a large amount of clicking in a short amount of time. Alternately, it could be used to cheat your way to a really high clickcount on one of those facebook games
    hmm i I want to create that for my chat program because my chat program have a refresh button and i want it every 2 seconds the refresh button will automatic click to load message

    thank you please help me

  6. #6
    Member
    Join Date
    Sep 2010
    Posts
    38

    Re: timer w/ button

    Try to create a timer which is enabled = true and Interval = 2000, interval = 2000 because it is in millisecond, so 2000 = 2 second.
    vb Code:
    1. Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
    2.         btnRefresh.PerformClick()
    3.     End Sub

    I hope this could help you...

  7. #7
    PowerPoster kaliman79912's Avatar
    Join Date
    Jan 2009
    Location
    Ciudad Juarez, Chihuahua. Mexico
    Posts
    2,593

    Re: timer w/ button

    Like palautot said, but you do not need to actually click the button, just call the corresponding sub whenever you need it

    vb.net Code:
    1. Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
    2.     Button1_Click(sender, e)
    3. End Sub

    On a more elegant solution I would create a procedure to refresh your chat and call that from both the timer tick and the button.
    More important than the will to succeed, is the will to prepare for success.

    Please rate the posts, your comments are the fuel to keep helping people

  8. #8

    Thread Starter
    New Member
    Join Date
    Oct 2010
    Posts
    4

    Re: timer w/ button

    Thank you All This is the Big Help

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width