Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Timer
Message
From
05/03/2008 07:47:47
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Re: Timer
Environment versions
Visual FoxPro:
VFP 9
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01298029
Message ID:
01298841
Views:
22
hi,
thank you both for help and clean up the code,

it works,
i think it is my fault becuse i duplicated INTO table TAlias1
for page1 and page3,
i change it as a differnt cursor as INTO cursor TAlias1 at page1,
INTO cursor TAlias2 at page3.

have a nice time





>I'm still confused about what it is you are asking. Are you saying that when the timer on page1 fires it refreshes the grid on page 3 and you don't want it to? Also why are you opening the table Trans1 in this code (it will be openned by the SELECT statement)?
>
>Here's a little clean up of your code to make it a bit more efficient
>
>Move the following code into the form's Init or Load event.
>
>SET SAFETY off
>SET CENTURY on
>SET DATE BRITISH
>SET TALK OFF
>SET STATUS off
>
>
>
>Now we can get rid of the variable and use the property directly and save a clock tick. We can also speed things up a bit by using the WITH/ENDWITH constructs.
>
>
>*event timer
>If Not Used('trans1')
>    USE trans1.dbf Alias trans1 Again In 0 Shared
>Endif
>
>SELECT trans1
>WITH ThisForm.pageframe1.page1
>  IF EMPTY(.text4.value)
>    .Grid1.visible=.f.
>  ELSE
>    WITH .Grid1
>      .visible=.t.
>      SELECT  TAlias1.time1,TAlias1.date1,TAlias1.roomno,TAlias1.place1,TAlias2.mobile,TAlias2.tel,TAlias2.empname, TAlias1.discerror,TAlias1.sno ;
>        FROM trans1 TAlias1, emp1 TAlias2 ;
>       WHERE  TAlias1.empno = TAlias2.empno   ;
>         AND TAlias1.fexerno=val(ThisForm.pageframe1.page1.text4.value) AND mark1=0;
>    ORDER BY date1,sno ;
>        INTO table TAlias1
>
>
>       .RecordSource="TAlias1"
>
>       WITH .column9
>         WITH .header1
>           .caption="ÑÞã ÇáÚØÜá"
>           .fontsize=13
>           .fontbold=.t.
>         ENDWITH
>         .WIDTH=60
>         .Alignment = 2
>         .backcolor="255,0,128"
>      ENDWITH
>
>       WITH .column8
>         WITH .header1
>           .caption="äæÚ ÇáÚØÜá"
>           .fontsize=13
>           .fontbold=.t.
>         ENDWITH
>         .WIDTH=60
>         .Alignment = 2
>         .backcolor="255,0,128"
>      ENDWITH
>
>       WITH .column7
>         WITH .header1
>           .caption="ÇÓã ÇáãæÙÝ"
>           .fontsize=13
>           .fontbold=.t.
>         ENDWITH
>         .WIDTH=60
>         .Alignment = 2
>         .backcolor="255,0,128"
>      ENDWITH
>
>       WITH .column6
>         WITH .header1
>           .caption="åÇÊÝ ÇÑÖí"
>           .fontsize=13
>           .fontbold=.t.
>         ENDWITH
>         .WIDTH=60
>         .Alignment = 2
>         .backcolor="255,0,128"
>      ENDWITH
>
>       WITH .column5
>         WITH .header1
>           .caption="åÇÊÝ Îáæí"
>           .fontsize=13
>           .fontbold=.t.
>         ENDWITH
>         .WIDTH=60
>         .Alignment = 2
>         .backcolor="255,0,128"
>      ENDWITH
>
>       WITH .column4
>         WITH .header1
>           .caption=" ãæÞÚ ÇáÚØá"
>           .fontsize=13
>           .fontbold=.t.
>         ENDWITH
>         .WIDTH=60
>         .Alignment = 2
>         .backcolor="255,0,128"
>      ENDWITH
>
>       WITH .column3
>         WITH .header1
>           .caption=" ÑÞã ÇáÛÑÝÉ"
>           .fontsize=13
>           .fontbold=.t.
>         ENDWITH
>         .WIDTH=60
>         .Alignment = 2
>         .backcolor="255,0,128"
>      ENDWITH
>
>       WITH .column3
>         WITH .header1
>           .caption=" ÊÇÑíÎ ÇáÚØá"
>           .fontsize=13
>           .fontbold=.t.
>         ENDWITH
>         .WIDTH=60
>         .Alignment = 2
>         .backcolor="255,0,128"
>      ENDWITH
>
>       WITH .column1
>         WITH .header1
>           .caption=" æÞÊ ÇáÊÈáíÛ"
>           .fontsize=13
>           .fontbold=.t.
>         ENDWITH
>         .WIDTH=60
>         .Alignment = 2
>         .backcolor="255,0,128"
>      ENDWITH
>      GO TOP
>    ENDWITH
>  ENDIF
>ENDWITH
>
Previous
Reply
Map
View

Click here to load this message in the networking platform