| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1585 人关注过本帖
标题:求大师帮忙:为什么我编的表表单,第一天可以运行,第二天就不能运行了?!
只看楼主 加入收藏
火焰0451
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2016-8-26
结帖率:0
收藏
已结贴  问题点数:20 回复次数:6 
求大师帮忙:为什么我编的表表单,第一天可以运行,第二天就不能运行了?!
我编了一个小程序,就是在一个表单上添加了几个小动画(.gif),当按“A”键时,第一个动画出现。当按“B”键时,第二个动画出现,依此类推。
可是第一天好好的,第二天运行表单时,表单可以运行,但是按A,B键,动画却不出现。对程序动动,就是删除,再写入,和第一次写的一样。又好用了。
只后,还会出现运行表单,动画不出现的现像。

求大师指点啊!!感谢!!
我是个初学的爱好者.
搜索更多相关主题的帖子: 爱好者 动画 
2016-08-26 22:58
sdta
Rank: 20Rank: 20Rank: 20Rank: 20Rank: 20
来 自:江苏省连云港市
等 级:版主
威 望:335
帖 子:9802
专家分:26906
注 册:2012-2-5
收藏
得分:5 
上传文件看看

坚守VFP最后的阵地
2016-08-26 23:40
hu9jj
Rank: 20Rank: 20Rank: 20Rank: 20Rank: 20
来 自:红土地
等 级:贵宾
威 望:400
帖 子:11772
专家分:43421
注 册:2006-5-13
收藏
得分:5 
大概是楼主程序编制好了之后尚未烧香磕头吧

活到老,学到老!http://www.(该域名已经被ISP盗卖了)E-mail:hu-jj@
2016-08-27 07:02
tlliqi
Rank: 19Rank: 19Rank: 19Rank: 19Rank: 19Rank: 19
等 级:贵宾
威 望:204
帖 子:15453
专家分:65956
注 册:2006-4-27
收藏
得分:5 
以下是引用hu9jj在2016-8-27 07:02:00的发言:

大概是楼主程序编制好了之后尚未烧香磕头吧
那该怎办呢
2016-08-27 07:46
火焰0451
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2016-8-26
收藏
得分:0 
回复 2楼 sdta
在表单的Init里
thisform.image1.Visible = .F.
thisform.image2.Visible = .F.
thisform.image3.Visible = .F.
thisform.image4.Visible = .F.

thisform.timer1.Enabled = .F.
thisform.timer2.Enabled = .F.
thisform.timer3.Enabled = .F.
thisform.timer4.Enabled = .F.

thisform.image1.Picture ="D:\我的资料库\Documents\Visual FoxPro 项目\1\dh1.gif"
thisform.image2.Picture ="D:\我的资料库\Documents\Visual FoxPro 项目\1\dh2.gif"
thisform.image3.Picture ="D:\我的资料库\Documents\Visual FoxPro 项目\1\dh3.gif"
thisform.image4.Picture ="D:\我的资料库\Documents\Visual FoxPro 项目\1\dh4.gif"

在表单的Keypress里
LPARAMETERS nKeyCode, nShiftAltCtrl
LOCAL lc
      lc=CHR(nkeycode)
 DO case
      CASE LC=="A"      
        THISFORM.image1.Visible=.T.
        thisform.timer1.Enabled = .T.
    CASE LC=="B"
      
        THISFORM.image2.Visible=.T.
        thisform.timer2.Enabled = .T.
    CASE LC=="C"
   
        THISFORM.image3.Visible=.T.
        thisform.timer3.Enabled = .T.
    CASE LC=="D"
      
         THISFORM.image4.Visible=.T.
         thisform.timer4.Enabled = .T.
endcase         
此外还有4个时钟
Timer1的timer里
thisform.image1.Visible = .F.
2016-08-27 21:45
吹水佬
Rank: 20Rank: 20Rank: 20Rank: 20Rank: 20
等 级:版主
威 望:451
帖 子:10539
专家分:42927
注 册:2014-5-20
收藏
得分:5 
CASE LC=="A"      
        THISFORM.image1.Visible=.T.
        thisform.timer1.Enabled = .T.

Timer1的timer里
thisform.image1.Visible = .F.

image1.Visible=.T.跟着又image1.Visible=.F.,这样起什么作用?
2016-08-28 00:44
hu9jj
Rank: 20Rank: 20Rank: 20Rank: 20Rank: 20
来 自:红土地
等 级:贵宾
威 望:400
帖 子:11772
专家分:43421
注 册:2006-5-13
收藏
得分:0 
以下是引用火焰0451在2016-8-27 21:45:51的发言:

在表单的Init里
thisform.image1.Visible = .F.
thisform.image2.Visible = .F.
thisform.image3.Visible = .F.
thisform.image4.Visible = .F.

thisform.timer1.Enabled = .F.
thisform.timer2.Enabled = .F.
thisform.timer3.Enabled = .F.
thisform.timer4.Enabled = .F.

thisform.image1.Picture ="D:\我的资料库\Documents\Visual FoxPro 项目\1\dh1.gif"
thisform.image2.Picture ="D:\我的资料库\Documents\Visual FoxPro 项目\1\dh2.gif"
thisform.image3.Picture ="D:\我的资料库\Documents\Visual FoxPro 项目\1\dh3.gif"
thisform.image4.Picture ="D:\我的资料库\Documents\Visual FoxPro 项目\1\dh4.gif"

在表单的Keypress里
LPARAMETERS nKeyCode, nShiftAltCtrl
LOCAL lc
      lc=CHR(nkeycode)
 DO case
      CASE LC=="A"      
        THISFORM.image1.Visible=.T.
        thisform.timer1.Enabled = .T.
    CASE LC=="B"
      
        THISFORM.image2.Visible=.T.
        thisform.timer2.Enabled = .T.
    CASE LC=="C"
   
        THISFORM.image3.Visible=.T.
        thisform.timer3.Enabled = .T.
    CASE LC=="D"
      
         THISFORM.image4.Visible=.T.
         thisform.timer4.Enabled = .T.
endcase         
此外还有4个时钟
Timer1的timer里
thisform.image1.Visible = .F.

根据按键打开一个图片和定时器之后要将其它图片设置成不可见,否则程序运行的结果就很难预测。
定时器控件应该有一个就足够处理了,没有必要每个图片使用一个。

活到老,学到老!http://www.(该域名已经被ISP盗卖了)E-mail:hu-jj@
2016-08-30 08:47
快速回复:求大师帮忙:为什么我编的表表单,第一天可以运行,第二天就不能运行了 ...
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.017848 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved