Woot! After much brainstorming I managed to come up with a code for saving the settings that works! For once I managed to figure something out without using Google haha, I must be progressing.
Sure, it's not the prettiest code in the world but it's effective.
This is the "Save Details" button code
Code:
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Accounts.Items.Add(NewUserTxt.Text)
SaveSetting("AutoLogin.exe", NewUserTxt.Text, "User", NewUserTxt.Text)
SaveSetting("AutoLogin.exe", NewUserTxt.Text, "Pass", NewPassTxt.Text)
End Sub
And this is how it pulls the information of each account according to whichever is selected in the listbox:
Code:
Private Sub Accounts_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Accounts.SelectedIndexChanged
UserTxt.Text = GetSetting("AutoLogin.exe", Accounts.SelectedItem, "User")
PassTxt.Text = GetSetting("AutoLogin.exe", Accounts.SelectedItem, "Pass")
End Sub
So yeah that works perfectly despite it being a bit clumsy.
The only thing left to do is figure out how to move the process to the top window if it's already running (for example after I do (CheckProcess("Notepad.exe")) if the value is true then Notepad should become to focus window)
Any ideas? Thanks so much for your help on this guys, really made it a lot less frustrating haha
J-Deezy.
EDITTT: Spoke wayyy too soon. While that code is all fine and dandy while the app is still running, I'm having trouble recalling all the usernames into the ListBox on start. More brainstorming it seems
Okay EDIT2: I changed the order of the "SaveSetting(" to
Code:
SaveSetting("AutoLogin.exe", "Users", NewUserTxt.Text, NewUserTxt.Text)
Because I figure in theory using "Listbox1.Items.Add(GetSetting("AutoLogin.Exe" , "Users")"
Would simply load all the .text saved into the "Users" folder into separate Listbox entries. Apparently not. Is there any way to do this?
Cheers. (Still need help on the "bring process to top" question

)