注册 登录
编程论坛 VB.NET论坛

新手,VB创建TXT文件和文件夹位置怎么自选,且将位置保存起来

h15839789349 发布于 2016-10-13 18:37, 2894 次点击
新手,求知道的本分免费帮助一下,在此谢过!
2 回复
#2
梦幻倩影2016-10-26 21:05
用这个对话框 SaveFileDialog
#3
yangtianyu922017-07-30 20:16
        Dim FileName As String
        SaveFileDialog1.InitialDirectory = "C:\"
        SaveFileDialog1.Filter = "文本文件(*.txt)|*.txt|所有文件|*.*"
        SaveFileDialog1.RestoreDirectory = True
        SaveFileDialog1.FilterIndex = 1
        SaveFileDialog1.Title = "保存记录文档"
        SaveFileDialog1.AddExtension() = True
        SaveFileDialog1.CheckPathExists() = True
        SaveFileDialog1.ValidateNames() = True
        SaveFileDialog1.ShowHelp() = True
        SaveFileDialog1.OverwritePrompt() = True
        SaveFileDialog1.ShowDialog()
        FileName = SaveFileDialog1.FileName

        (FileName.ToString, TextBox1.Text, False, System.Text.Encoding.Default)
1