Timer Control - strange behaviour 
Author Message
 Timer Control - strange behaviour

I have written a small database application which starts up with a Splash
screen. From within this form I open the main form, open the DB-connections,
etc...
On the Splash screen I have placed a Timer Control with a 2000ms interval.
In the Timer_timer event I unload the Splash screen AND set the
Timer.Interval to ZERO and set Timer.Enabled to FALSE.
Now whenever the application is running and you try to switch to another
application (Word, Explorer, mail, whatever) within 2 seconds the
DB-application pops up again taking focus.
When I remove the Timer Control I get rid of this.
How is this possible ? I disable the timer and unload the form on which it
is placed.
Does anybody know of this being a feature, bug, something I don't know about
?
I'm using VB6 enterprise edition, no service packs installed.

Any comments are welcome, thanks in advance.

Ronald Dirkx
Flexys N.V.



Sun, 24 Nov 2002 03:00:00 GMT  
 Timer Control - strange behaviour
#1 on your list should be to get the service packs. There's a note on at
least one of these SP's that says "Warning: Do Not Distribute Any
Software Written in VB6 without installing this Service Pack" (or
something similar).

The order of operations you listed might be a problem if you're using
something like...

Unload Me
Timer1.Interval = 0
Timer1.Enabled = False

The Unload needs to be the >last< thing you're doing otherwise the form
won't unload since it needs to reload itself in order to execute those
last 2 commands. Maybe try changing the order to...

Timer1.Enabled = False
Timer1.Interval = 0
Unload Me

and see if this helps.


Quote:
> I have written a small database application which starts up with a
Splash
> screen. From within this form I open the main form, open the
DB-connections,
> etc...
> On the Splash screen I have placed a Timer Control with a 2000ms
interval.
> In the Timer_timer event I unload the Splash screen AND set the
> Timer.Interval to ZERO and set Timer.Enabled to FALSE.
> Now whenever the application is running and you try to switch to
another
> application (Word, Explorer, mail, whatever) within 2 seconds the
> DB-application pops up again taking focus.
> When I remove the Timer Control I get rid of this.
> How is this possible ? I disable the timer and unload the form on
which it
> is placed.
> Does anybody know of this being a feature, bug, something I don't know
about
> ?
> I'm using VB6 enterprise edition, no service packs installed.

> Any comments are welcome, thanks in advance.

> Ronald Dirkx
> Flexys N.V.



Sun, 24 Nov 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. DT Picker Control on Multi Page - Strange Behaviour

2. Strange control event behaviour

3. strange data control behaviour with DAO 3.6 and SQL server

4. Strange RichText Control Behaviour

5. Strange behaviour on common controls, HELP !!!!!!

6. Strange behaviour with array of Winsock controls

7. Strange control event behaviour

8. Strange behaviour on common controls, HELP !!!!!!

9. Strange behaviour on common controls, HELP !!!!!!

10. strange behaviour of a subform, or a bug?

11. Strange Access behaviour or Bug, or what ?!?

12. Strange Behaviour

 

 
Powered by phpBB® Forum Software