Stop Flashing a MDIForm when activated 
Author Message
 Stop Flashing a MDIForm when activated

...well, I thought this would be easy but there is something wrong :
I have a VB5 MDIForm using the FlashWindow API function (with a timer).
This is working fine.
Now I want the MDIForm to stop flashing when the user activate it, or
clic on her icon in the taskbar.

Here is my code :

Private Sub MDIForm_Activate()
    Timer1.Enabled = False
End Sub

Private Sub Timer1_Timer()
FlashWindow Me.hWnd, 1
End Sub

But the Activate event is not detected when the user put the window is
getting the focus... And the MDIForm is flashing... forever...

Is this the wrong event ?
I found a Gotfocus event on Form objects, but not on MDIForm objects. Is
there an existing event I can use on  MDIForms ?

Thanks

Lassie



Sat, 16 Feb 2002 03:00:00 GMT  
 Stop Flashing a MDIForm when activated
Put the screen.activeform also in your timer loop

If Screen.activeform is me Then

'''

End IF

Quote:

>...well, I thought this would be easy but there is something wrong :
>I have a VB5 MDIForm using the FlashWindow API function (with a timer).
>This is working fine.
>Now I want the MDIForm to stop flashing when the user activate it, or
>clic on her icon in the taskbar.

>Here is my code :

>Private Sub MDIForm_Activate()
>    Timer1.Enabled = False
>End Sub

>Private Sub Timer1_Timer()
>FlashWindow Me.hWnd, 1
>End Sub

>But the Activate event is not detected when the user put the window is
>getting the focus... And the MDIForm is flashing... forever...

>Is this the wrong event ?
>I found a Gotfocus event on Form objects, but not on MDIForm objects. Is
>there an existing event I can use on  MDIForms ?

>Thanks

>Lassie



Sat, 16 Feb 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Problem: MDIform activate event

2. Making a picture flash without activating it

3. Stop maximize in MDIForm ... HELP

4. Number lock flashes- how to stop?!

5. Stop the windows flashing while processing a form????

6. How to stop guage control flashing

7. how to stop my flashing status bar

8. VB6: Stop Flashing Me!

9. How to Stop HScrollBar from flashing/flickering

10. FlashWindowEx - how to stop a window flashing

11. How do I stop screen flashing?

12. How to stop a program from double activating?

 

 
Powered by phpBB® Forum Software