Timer Events

  • Thread starter Thread starter Duncan Edment
  • Start date Start date
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
 
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
 
Back
Top