本文介绍了在Visual Basic中保存信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
所以我想知道在程序运行时用户是否可以保存信息。因此,如果我提示用户输入他们的名字并输入,他们是否可以退出正在运行的程序,然后当他们启动程序时,会自动显示他们的名字,这是我的简单代码
So I wanted to know if it was possible for the User to Save information when the Program is running. So if I prompt the User to enter their name and they enter it, is it possible for them to exit the running program and then when they start the program it will automatically display their name, here is my simple code
Public Class Form1 Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load Dim Change As String Change = InputBox("What is Your Name?") lblChange.Text = Change End Sub End Class推荐答案
是。
你可以使用设置。
创建设置字符串
IE:FullName
IE: FullName
然后在代码中
My.Settings.FullName=InputBox("Whats you full name") my.settings.save抬头,你可能会在这里被私刑使用输入框
Heads up, you may get lynched around here for using inputbox
更多推荐
在Visual Basic中保存信息
发布评论