VB 版 (精华区)

发信人: Mice (御风而行), 信区: VB
标  题: Re: 与新斑竹再探讨VB小问题
发信站: 哈工大紫丁香 (2000年06月10日16:33:08 星期六), 转信

很早就答应过你的,一直没有时间,SORRY


Private Sub Timer1_Timer()
'**************************************
'倒计时
'**************************************

Times = Times - 1
If Check1.Value = 1 Then
    Timer1.Enabled = False
    Exit Sub
End If
Timer1.Enabled = False
Label7 = "还有" & Times & "秒,系统将自动运行"
If Times <= 0 Then
    WritePrivateProfileString "LastTime", "Define", CStr(Text1.Text), 
App.Path & "/Tax.ini"
    If Option1(0).Value = 1 Then
        WritePrivateProfileString "LastTime", "Auto", CStr("1"), App.
Path & "/Tax.ini"
    Else
        WritePrivateProfileString "LastTime", "Auto", CStr("0"), App.
Path & "/Tax.ini"
    End If
    WritePrivateProfileString "LastTime", "StartDay", CStr(Text2.Text),
 App.Path & "/Tax.ini"
    WritePrivateProfileString "LastTime", "EndDay", CStr(Text3.Text), 
App.Path & "/Tax.ini"
    
    Load FrmMain
    Unload Me
Else
    Timer1.Enabled = True
End If
End Sub


这是我原来给国税局做的一个项目的一个部分

没有时间修改了,你看看 会有启发的




【 在 zxfsnow (最近睡眠太少) 的大作中提到: 】
: 我的思路大致和folmorse一样!
:     调用API函数Declare Sub Sleep Lib "kernel32"
:     _ Alias "Sleep" (ByVal dwMilliseconds As Long)
:     作为一个延时,首先设定一个值,然后每延时一段时间
:     就相应的减数,达到延时倒计时的目的!
: 【 在 folmorse (◆金瓶楼主◆) 的大作中提到: 】
: :   这样的代码太多了,自己找找吧!
: : 再说也没把事情说清楚。
: :   反正大致的思想就是:先设定一个已知的时间,
: :   然后不断减吧!


--
我愿我是一个无比美丽的梦境
                       让你永远永远也走不出来

 老鼠说:愿紫丁香花开四季 香飘万里  
 

※ 来源:·哈工大紫丁香 bbs.hit.edu.cn·[FROM: 202.97.204.180]
※ 修改:·Mice 於 06月10日16:34:53 修改本文·[FROM: 202.97.204.180]
[百宝箱] [返回首页] [上级目录] [根目录] [返回顶部] [刷新] [返回]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:6.625毫秒