Visual basic help ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Visual basic help ?

Hey guys. I am really stuck using visual basic. My college tutor has us using this software called visual basic to create a MIS. I am trying to create a password and username log in screen. I have thus far, created the username and password buttons to log in, with the "if" statments. I am struggling on how to create the code to give the user an option to change the password after they have logged in. I am trying to implement the "dim. filewrite" variables to read and write to a file so that the password can be changed ? Can anyone run me through it step by step ? I am an absolute novice at the moment. Thanks Harry

26th Dec 2018, 7:36 PM
harry
6 Answers
0
You're lucky you have a programming teacher and I think that you shouldn't be shy and ask more questions to your teacher, and not copy the code step by step, this is the only way you can learn something.
26th Dec 2018, 9:27 PM
Solo
Solo - avatar
0
I understand some parts. Just not all. It can get a little confusing. Just need someone to guide me through log in screen stuff and I will get it
26th Dec 2018, 9:33 PM
harry
0
I started to learn Visual Basic but it was a long time ago, I don’t know if I can remember something to help you. ☺ What kind of Visual are you doing?
26th Dec 2018, 9:49 PM
Solo
Solo - avatar
0
Visual studio 2017. Its only creating a log in screen that allows the user to change there password .
26th Dec 2018, 9:58 PM
harry
0
Well, yes, I was familiar.☺ Write a piece of code that stalled.
26th Dec 2018, 10:09 PM
Solo
Solo - avatar
0
Public Class Form4 Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Dim FileWrite As System.IO.StreamWriter Dim FileRead As IO.StreamReader If TextBox1.Text = TextBox2.Text Then MsgBox("New Password Saved") FileWrite = My.Computer.FileSystem.OpenTextFileWriter("C:\Users\deadl\Documents\Visualstudio.txt", False) FileWrite.WriteLine(Text) FileWrite.Close() End If End Sub Private Sub Form4_Load(sender As Object, e As EventArgs) Handles MyBase.Load End Sub End Class So what i'm trying to do is, upon clicking the log in button the code will save the new password the user has entered into a file. (It's from the "Enter new password" and "confirm new password boxes") If someone could tell me how I can share the whole program via a link, maybe that would be easier.
27th Dec 2018, 12:13 AM
harry