我使用vb6.0时,输入代码后点击运行,出来的是一个空白窗口,根本不显示程序运行后的结果,这是为什么
- 提问者网友:杀手的诗
- 2021-03-01 21:57
- 五星知识达人网友:琴狂剑也妄
- 2021-03-01 22:30
程序代码是啥?
- 1楼网友:神也偏爱
- 2021-03-01 22:48
照图画控件
代码如下 ,
'参数 path 路径 '文件个数cout' '后面一个随意 ,不选,表示直接生成cout个文件,选了,表示用计时器自生成
dim file_cout as integer
private sub create_text(byval path as string, byval cout as integer, _ optional style as integer = 0)
dim i as integer if style <= 0 then for i = 0 to cout open path & "\" & i & ".txt" for append as #1 close #1 next i exit sub else open path & "\" & cout & ".txt" for append as #1 close #1 end if end sub
private sub check1_click() if check1.value = 1 then timer1.interval = val(text3) * 1000 else timer1.interval = 0 end if end sub
private sub command1_click() create_text text1, val(text2) msgbox "生成完了" & val(text2) & "个文件" end sub
private sub timer1_timer()
create_text text1, file_cout, check1.value file_cout = file_cout + 1 if file_cout >= val(text2) then timer1.interval = 0 msgbox "生成完了" & val(text2) & "个文件" end if
end sub