Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with timer control
Message
De
05/04/2004 02:43:12
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Problem with timer control
Divers
Thread ID:
00892170
Message ID:
00892170
Vues:
50
Dear Sir,

I have a form and a dbf. On form there are some textboxes and a timer control.
The timer interval is 1000. The timer event has following codes
Form can be download by: http://www.foxite.com/uploads/_7g0ijw2b.zip

*--------------------
SET SAFE OFF
SET DATE TO BRITISH

AJK11=DATE()
AJK12=MONTH(DATE()) && month
AJK13=DTOC(DATE())
AJK14=SUBSTR(AJK13,1,2)
AJK15=VAL(AJK14)
AJK16=INT(AJK15) && date

SELECT SUNS
SELECT * FROM SUNS WHERE MONTH=AJK12 AND DATE=AJK16 INTO CURSOR SXK

SELECT SXK
AJK17=TALOO
AJK18=GROOB

AJK25=SUBSTR(AJK18,1,2) && hours
AJK26=SUBSTR(AJK18,6,7) && minutes

STORE (VAL(AJK25)*60*60)+(VAL(AJK26)*60)TO NSECONDS
NSECONDS1=NSECONDS+43200

AJK27= ALLTRIM(STR(HOUR(DATETIME( ))))
AJK28=ALLTRIM(STR(MINUTE(DATETIME())))

STORE (VAL(AJK27)*60*60)+(VAL(AJK28)*60)TO NSECONDS2

AJK29=NSECONDS1-NSECONDS2

THISFORM.TEXT15.VALUE= PADL( INT(( AJK29 % 86400 ) / 3600 ), 2, '0' );
+SPACE(1)+ALLTRIM('-')+SPACE(1) ;
+ PADL( INT(( AJK29 % 3600 ) / 60 ), 2, '0')
*--------------------
When form loads, the cursor goes to text1, when I try to write anything in the texthbox the cursor automatically,every time, goes to the beginning of the textbox.

In other case If I set the timer interval to 0 then every thing works fine. What is casuse? Why I could not write into textbox1.

Please help
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform