为什么用这个代码编辑的打字效果字完了不消失~急
答案:1 悬赏:70
解决时间 2021-11-06 03:45
- 提问者网友:相思似海深
- 2021-11-05 11:33
为什么用这个代码编辑的打字效果字完了不消失~急
最佳答案
- 二级知识专家网友:不想翻身的咸鱼
- 2021-11-05 13:09
为什么用这个代码编辑的打字效果字完了不消失~急 悬赏分:10 - 离问题结束还有 14 天 23 小时 Option Explicit Dim ss As String Dim sp As Integer ' 指出当前使用的字符在字符串中的位置。 Private Sub Command2_Click() Unload Me End Sub Private Sub Command1_Click() End Sub Private Sub Form_Load() Text1.Visible = False Dim s As String, nl As String * 2 aa = 0 Timer1.Enabled = False Text1 = Timer1.Interval ss = "" nl = Chr$(13) & Chr(10) Open App.Path & "\test.txt" For Input As #1 While Not EOF(1) Line Input #1, s ss = ss & s & nl Wend Close #1 sp = 0 Picture1.Cls Timer1.Enabled = True If IsNumeric(Trim(Text1)) Then Timer1.Interval = Text1 End If End Sub Private Sub Timer1_Timer() Dim sw As String, CurX As Single, CurY As Single CurX = Picture1.CurrentX CurY = Picture1.CurrentY Picture1.Line (CurX, CurY)-(CurX + 300, CurY + 300), Picture1.BackColor, BF Picture1.CurrentX = CurX: Picture1.CurrentY = CurY sp = sp + 1 If sp > Len(ss) Then Timer1.Enabled = False Else sw = Mid(ss, sp, 1) If Asc(sw) = 13 Then Picture1.Print "" sp = sp + 1: sw = Mid(ss, sp, 1) Else Picture1.Print sw; End If CurX = Picture1.CurrentX: CurY = Picture1.CurrentY Picture1.Line (CurX + 20, CurY + 230)-(CurX + 120, CurY + 240), _ QBColor(0), BF Picture1.CurrentX = CurX: Picture1.CurrentY = CurY End If End Sub Private Sub Timer2_Timer() Form3.Show Form1.Visible = False End Sub 问题就在最后这里为什么Form1.Visible = False不起作用.我想要Test.txt里的问题显示完,Form1就关闭.(本代码内3个窗体运行顺须是Form2到Form1再到Form3
我要举报
如以上问答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯