Click here to Skip to main content
15,924,038 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: TreeView Pin
David Wengier7-Apr-02 8:12
David Wengier7-Apr-02 8:12 
GeneralRe: TreeView Pin
Fernando Finelli26-Apr-02 7:39
Fernando Finelli26-Apr-02 7:39 
GeneralSpeech to text Example is not working Pin
6-Apr-02 15:37
suss6-Apr-02 15:37 
GeneralDownloading a file Using ActiveX ctrl in VB6 Pin
patty5-Apr-02 22:02
patty5-Apr-02 22:02 
GeneralVB.NET events button Pin
SimonS4-Apr-02 2:56
SimonS4-Apr-02 2:56 
GeneralRe: VB.NET events button Pin
David Wengier4-Apr-02 11:05
David Wengier4-Apr-02 11:05 
GeneralRe: VB.NET events button Pin
SimonS4-Apr-02 22:08
SimonS4-Apr-02 22:08 
Generala Timer in a class Pin
Jerome Conus2-Apr-02 20:52
Jerome Conus2-Apr-02 20:52 
Hi !

I'm using VB 6. I want to develop a class (.cls) in which I would like to instanciate a Timer (m_myTimer) and react to the event m_myTimer_Timer().

I know how to do that in a form (I put on my form the 'Timer' control), but I'm not able to do it in my class. I tried to do that :

<br />
Dim WithEvents m_myTimer As Timer<br />
<br />
Private Sub Class_Initialize()<br />
<br />
    m_myTimer.Enabled = True<br />
    m_myTimer.Interval = 2000<br />
    <br />
End Sub<br />
<br />
Private Sub m_myTimer_Timer()<br />
<br />
	' Handle event <br />
<br />
End Sub<br />


but I get an error at line 'm_myTimer.Enabled= True'. I guess I have somewhere to do something like 'Set m_myTimer=whatever', but I can't figure out what to do.

Thank you for your help !
Jerome
GeneralRe: a Timer in a class Pin
Andrew Peace6-Apr-02 1:03
Andrew Peace6-Apr-02 1:03 
Generaldeploy VB and Crystal Report Pin
Le Nhan2-Apr-02 17:17
Le Nhan2-Apr-02 17:17 
GeneralRe: deploy VB and Crystal Report Pin
4-Apr-02 1:48
suss4-Apr-02 1:48 
GeneralVB String Sort Routine Pin
1-Apr-02 13:31
suss1-Apr-02 13:31 
GeneralRe: VB String Sort Routine Pin
Michael.Weiss2-Apr-02 2:41
Michael.Weiss2-Apr-02 2:41 
GeneralRe: VB String Sort Routine Pin
2-Apr-02 7:12
suss2-Apr-02 7:12 
GeneralClass ModuleProblems Pin
1-Apr-02 5:55
suss1-Apr-02 5:55 
GeneralRe: Class ModuleProblems Pin
Gaurika Wijeratne23-Apr-02 21:20
Gaurika Wijeratne23-Apr-02 21:20 
GeneralHowTo?: Vb.Net ListView Pin
peakdw1330-Mar-02 3:55
peakdw1330-Mar-02 3:55 
GeneralRe: HowTo?: Vb.Net ListView Pin
David Stone4-Apr-02 8:24
sitebuilderDavid Stone4-Apr-02 8:24 
GeneralRe: HowTo?: Vb.Net ListView Pin
4-Apr-02 9:32
suss4-Apr-02 9:32 
GeneralSystem Message in VB Pin
Michael.Weiss28-Mar-02 1:49
Michael.Weiss28-Mar-02 1:49 
GeneralRe: System Message in VB Pin
Paul M Watt21-Apr-02 11:46
mentorPaul M Watt21-Apr-02 11:46 
GeneralRe: System Message in VB Pin
Fernando Finelli26-Apr-02 7:42
Fernando Finelli26-Apr-02 7:42 
GeneralPicture or text in a button control Pin
Jerome Conus27-Mar-02 23:15
Jerome Conus27-Mar-02 23:15 
GeneralRe: Picture or text in a button control Pin
Nick Parker28-Mar-02 5:58
protectorNick Parker28-Mar-02 5:58 
GeneralApplications Dependencies Pin
Schalk27-Mar-02 18:55
Schalk27-Mar-02 18:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.