在Visual Basic中保存信息

编程入门 行业动态 更新时间:2024-10-08 19:49:28
本文介绍了在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中保存信息

本文发布于:2023-11-25 18:03:55,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1630775.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:信息   Visual   Basic

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!