一个VB问题

[复制链接]
查看11 | 回复3 | 2009-1-15 10:43:40 | 显示全部楼层 |阅读模式
怎样在VB中实现让Textbox每5分钟保存一次,格式为.txt,名称为notes

回复

使用道具 举报

千问 | 2009-1-15 10:43:40 | 显示全部楼层
在窗体上放一个 Timer控件,设置Timer1的Interval属性为300000,然后双击Timer1进入编程界面,拷贝以下代码: Private Sub Timer1_Timer() Open App.Path & "\notes.txt" For Output As #1 Seek #1, 1 Print #1, Text1.Text Close #1 End Sub...
回复

使用道具 举报

千问 | 2009-1-15 10:43:40 | 显示全部楼层
加timer控件 双击编写代码Private Sub Form_Load()timer1.Interval=300000End SubPrivate Sub Timer1_Timer() Open App.Path & "\notes.txt" For Output As #1 Seek #1, 1 Print #1, T...
回复

使用道具 举报

千问 | 2009-1-15 10:43:40 | 显示全部楼层
在窗体上放一个 timer控件,在控件的 timer1_timer事件里复制上以下代码:Private Sub Timer1_Timer()Open App.Path & "\notes.txt" For Output As #1Seek #1, 1Print #1, Text1.TextClose #1End Sub...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行