Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with timer
Message
De
15/09/2007 10:13:41
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
15/09/2007 09:33:34
Reza Meamar
Homa Programming Group
Shiraz, Iran
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP1
Divers
Thread ID:
01254533
Message ID:
01254537
Vues:
17
>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)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform