如何从文本框中获取和保存文本? [英] How to get and save text from text box ?
问题描述
我有一个带有文本框的框架,然后单击确定并取消单击.我想保存用户在文本框"txtTargetName"中输入的文本在一个文件中.我试图将一个文本框的内容定义为:
I have a frame with a text boxes and ok and cancel click. I want to save the text that user enters in textbox "txtTargetName" in a file. I tried to define the content of one text box as:
显式选项
私有子cmdOK_Click()
Private sub cmdOK_Click()
将点指向字符串
'在这里,我以#1格式打开文件进行输出
'here I open file as #1 for output
Point = txtTargetName.Text
Point=txtTargetName.Text
打印#1,点
,但显示类型不匹配".如果我输入"dim Point ..."在显式选项之后和私有子程序说类型不匹配之前.如果我将其放在其他框架中,则表示未定义变量.
but it says "Type mismatch". If I put "dim Point..." after option explicit and before private sub program says type missmatch, also. And if I put it in other frame, says that variable is not defined.
我该如何解决?
我使用VB 6.0
推荐答案
然后这也是在错误的论坛中.
Then this is in wrong forum, too.
这篇关于如何从文本框中获取和保存文本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!