On Mar 21, 2007, at 9:10 PM, Jayson Garrett wrote:

>
> How can I have my Timer subclass have a different default period than
> the regular Timer class?
>

It can be done with a constructor as you suggest. When a Timer  
subclass is instantiated using New(which runs the constructor) it  
must be assigned to an in-scope property, typically a window  
property. This approach works for me:

Add a property to your window: theTimer as MyTimer, where MyTimer or  
whatever is the name of your timer subclass containing the method:  
Constructor.
In Constructor have code like this:

             me.Period = 100
             me.Mode = 2

In a pushbutton, for example, the instantiation code would be like this:

             dim t as New MyTimer
             self.theTimer = t
             self.theTimer.Enabled = true




Best,

Jack
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to