Ok, I know this has been asked before but I'm a new user to VB and don't know where to start.

A Mate of mine is creating a Custom Minecraft Launcher useing VB for me.

We have 2 text boxes Username and Password and what I want it to do is On Closing the .exe to save the Contents of Username and Password to a .file, but for security perposes it needs to be encrypted before being exported to somewhere on the computer.

Can someone give me the code to encrypt 2 textboxes, where the Username is called txtUsername and the Password is called txtPassword.

It can be a very simple encryption, for example just switching the charactersets or something so an A = I
or something random unless anyone can think of a better way of encrypting.

IF someoen could write the code so I can copy and paste it, or if someone could point me in the right direction.

Thankyou in advance


Edited by Stealthbird97

4 Years
Discussion Span
Last Post by Reverend Jim

And where do i put this code

  Private Sub CheckBox1_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox1.CheckedChanged
        CheckBox1.Checked = True

    End Sub

    Private Sub txtPassword_TextChanged(sender As Object, e As EventArgs) Handles txtPassword.TextChanged

    End Sub

    Private Sub txtUsername_TextChanged(sender As Object, e As EventArgs) Handles txtUsername.TextChanged

    End Sub

I want it to save the User and Pass when the Checkbox is true.


first of all you should create your save's property
for this I've put a picture of how to do that
you can choose 'name' , 'type' , 'scope' and 'value'
select user scope so the value can be changed by code

now you can change it form your code : My.Settings.MyPropertyName

you can use a butoon to save your textboxes:

here we have two properties named "UserName" and "Password"

 Private Sub btnUpdate_Click(sender As Object, e As EventArgs) Handles btnUpdate.Click
 End Sub

Edited by MeSam0804

Excellent Help

And then how do i get it to load when it starts up next time?

is this correct?


Private Sub Launcher_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        ImageNum = 0
        txtUsername.text = My.Settings.Username
        txtPassword.text = My.Settings.Password
End Sub


Edited by Stealthbird97

This article has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.