Current location: Hot Scripts Forums » Programming Languages » Visual Basic » Classes and Timer


Classes and Timer

Reply
  #1 (permalink)  
Old 12-10-07, 06:42 AM
Jay6390's Avatar
Jay6390 Jay6390 is offline
Code Master
 
Join Date: Apr 2007
Location: United Kingdom
Posts: 1,330
Thanks: 0
Thanked 0 Times in 0 Posts
Classes and Timer

Hi, I have a class for tracking the foreground window, and i wanted to add a timer to the class so that i can regulate how often the class checks for a new foreground window. so far, i used

Code:
Private WithEvents tmrCheck as Timer
I then proceeded to try and set tmrCheck as a new timer with

Code:
Set tmrCheck as New Timer
but timer never came up in the list of classes that i could set it as

also, i tried to set the interval and enabled properties with

Code:
tmrCheck.Interval = 100
tmrCheck.Enabled = True
Unfortunately that didnt work either.
If someone is able to help me on this I would be most grateful

Jay
__________________
Useful Tutorials
[ PHP Video-1-2-3 ] [ MySQL 1-2-3 ]
For any php function reference type

www.php.net/FunctionName
Reply With Quote
  #2 (permalink)  
Old 12-24-07, 03:19 AM
urstop urstop is offline
Newbie Coder
 
Join Date: Dec 2007
Location: London
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Did you add the timer control to your form. The timer control is available in the controls tool box. Locate it and add it to your form.
__________________

.NET Software Freelancer UK
Reply With Quote
  #3 (permalink)  
Old 12-24-07, 06:44 AM
Jay6390's Avatar
Jay6390 Jay6390 is offline
Code Master
 
Join Date: Apr 2007
Location: United Kingdom
Posts: 1,330
Thanks: 0
Thanked 0 Times in 0 Posts
Yes, I am aware of how a timer can be added to a form. I am wanting to add it to a class dynamically so that for each class instance there is also a timer that will run
__________________
Useful Tutorials
[ PHP Video-1-2-3 ] [ MySQL 1-2-3 ]
For any php function reference type

www.php.net/FunctionName
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Classes and config files therat PHP 2 04-04-04 09:41 AM


All times are GMT -5. The time now is 01:17 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.