Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with timer
Message
From
15/09/2007 10:13:41
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
15/09/2007 09:33:34
Reza Meamar
Homa Programming Group
Shiraz, Iran
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP1
Miscellaneous
Thread ID:
01254533
Message ID:
01254537
Views:
18
>Dera All,
>I have a project with a main form. this main form is AS TOP LEVEL FORM with a menu in it. in the below of this form i put one image control that is Visible = .F.
>i put a timer on this form with Interval = 60000 , in the timer event i have below code:
>
>Select MsgTable
>locate for !ReadMsg
>if found()
>   MainForm.Image1.Visible = .T.
>else
>   MainForm.Image1.Visible = .F.
>endif
>
>
>but when i am in an input mode on a form that i run it from menu selection ( Modal , In Top-level form ) when timer event occure, i lost the focus in this form.
>what i must to do?
>Thanks and excuse me for my ENGLISH !

I don't know the answer, but your code can be simplified quite a bit, as follows:

This part:
if found()
   MainForm.Image1.Visible = .T.
else
   MainForm.Image1.Visible = .F.
endif
can be written in a single line:
MainForm.Image1.Visible = found()
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform