我在保存了时候只能保存最先写入的内容,而后面在其它打开子窗口中写入的内容都无法保存下来。
我的代码如下:
DIM NewDoc AS NEW FORM1
commondialog1.opensave
if commondialog1.filename<>"" then
open commondialog1.filename for output as #1
print #1,NewDoc.text1.text
close #1
end if
帮我看一看
我的代码如下:
DIM NewDoc AS NEW FORM1
commondialog1.opensave
if commondialog1.filename<>"" then
open commondialog1.filename for output as #1
print #1,NewDoc.text1.text
close #1
end if
帮我看一看
新建窗体
dim newdoc as new form1
allforms(i)=newdoc '或者 加个set关键字,好久没用了 i 为全局变量,为窗体的数量
在form1的Unload()里加入commondialog1.opensave
if commondialog1.filename<>"" then
open commondialog1.filename for output as #1
print #1,me.text1.text
close #1
end if