Timer Events

D

Duncan Edment

I have a TAB control on a form. On the first TAB, I have some scrolling
text through a timer event.

Is it possible to switch the timer event off when the second tab is
selected--as it is causing some disruption to the display--so that there is
no scrolling text and then switch it back on, when the first tab is
re-selected?

Rgds

Duncan

--
"Programming today is a race between software engineers striving to build
bigger and better idiot-proof programs, and the Universe trying to
produce bigger and better idiots.
So far, the Universe is winning."
~ Rich Cook
 
E

Emilia Maxim

Duncan Edment said:
I have a TAB control on a form. On the first TAB, I have some scrolling
text through a timer event.

Is it possible to switch the timer event off when the second tab is
selected--as it is causing some disruption to the display--so that there is
no scrolling text and then switch it back on, when the first tab is
re-selected?

Duncan,

you can set the TimerInterval property to 0. You can do this in the
tab control's OnChange event procedure:

Private Sub MyTab_Change()

Select Case Me!MyTab
Case 0 'First tab clicked
Me.TimerInterval = 999
Case 1 'Second tab clicked
Me.TimerInterval = 0
End Select

End Sub

Best regards
Emilia

Emilia Maxim
PC-SoftwareService, Stuttgart
http://www.maxim-software-service.de
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top