Hi!
After some experimenting I did figured out that the timer event, event after the timer is disabled, continue to fire! It looks like VFP cached the timer events during the form resizing internal processes, then fire the timer event as many times as needed for the passed period of time. To fix this behaviour, just use following very simple thing:
* Timer event
IF !MDOWN() AND
this.Enabledthis.Enabled = .F.
MESSAGEBOX("HI")
ENDIF
Now message box appears only once.
>This is great. I'm getting really close now.
>One more small problem, though.
>
>I have code similar to this in the timer:
>
>IF !MDOWN() THEN
> THISFORM.Timer1.Enabled = .F.
> MESSAGEBOX("HI")
>ENDIF
>
>And the timer is enabled on the resize. Works great in most situations.
>
>But, when i resize the form and hold it in the same position for 4-5 seconds before releasing the button on the mouse at that same position (at which point the timer will hit) it actually runs my code (and displays my messagebox) multiple times. The longer I hold the mouse before letting go the more times.
>
>I'm not sure exactly why this is happening or how to get around it.
>Any suggestions.
>Oh, and thank you very much for the help so far
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.comICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs
It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.