Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Where do I start?
Index -> Programming, Visual Basic and Other Basics -> Visual Basic Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Drewbie




PostPosted: Wed Jul 12, 2006 11:05 am   Post subject: Where do I start?

I am trying to make a program that will run and periodically press the up arrow without any assistance from me. The only problem is I dont know I would do it. I figure ill run something on a timer but i dont know after that. Please help.


Thank you
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Wed Jul 12, 2006 11:17 am   Post subject: (No subject)

you put SendKey() inside your timer controller
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
r.3volved




PostPosted: Wed Jul 12, 2006 11:46 am   Post subject: (No subject)

1. ^^ What he said
2. You can create your own event handler to be called
3. Whatever code you have executing for the uparrow you can either paste it into the timer event, or you can crate a function that gets called on keypress and in your timer event
Shaun Dreclin




PostPosted: Tue Dec 12, 2006 9:54 pm   Post subject: (No subject)

Assuming you are using VB6, I would say something along the lines of:

code:
Private Sub Timer1_Timer()
SendKeys "{up}"

End Sub
ZeroPaladn




PostPosted: Wed Dec 13, 2006 9:06 am   Post subject: (No subject)

Watch it with the necroposting. The topic is 5 months old, so it is long forgotten.
Shaun Dreclin




PostPosted: Wed Dec 13, 2006 12:57 pm   Post subject: (No subject)

Whoops, your right.

Sorry, I thought this was a more active forum. The topic WAS still on the first page.
Display posts from previous:   
   Index -> Programming, Visual Basic and Other Basics -> Visual Basic Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 6 Posts ]
Jump to:   


Style:  
Search: