Skip to content
MPGHThe Dark Arts
/
RegisterLog in
Forum
Community
What's NewLatest posts across the boardTrendingHottest threads right nowSubscribedThreads you follow
Discussion
GeneralIntroductionsEntertainmentDebate FortFlaming & Rage
Board
News & AnnouncementsMPGH TimesSuggestions & HelpGiveaways
More Sections
Art & Graphic DesignProgrammingHackingCryptocurrency
Hacks & Cheats
Games
ValorantCS2 / CS:GOCall of Duty / WarzoneFortniteApex LegendsEscape From Tarkov
+14 moreLeague of LegendsGTA VMinecraftRustROTMGBattlefieldTroveBattleOnCombat ArmsCrossFireBlackshotRuneScapeDayZDead by Daylight
Resources
Game Hacking TutorialsReverse EngineeringGeneral Game HackingAnti-CheatConsole Game Hacking
Tools
Game Hacking ToolsTrainers & CheatsHack/Release NewsNew
Submit a release →Share your cheat, tool, or config with the community.
AINEW
AI Tools
General & DiscussionPrompt EngineeringLLM JailbreaksHotAI Agents & AutomationLocal / Open Models
AI × Gaming
AI Aimbots & VisionML Anti-CheatGame Bots & Automation
Create
AI Coding / Vibe CodingAI Art & MediaAI Voice & TTS
The AI frontier →Where game hacking meets modern machine learning. Jump in.
Marketplace
Buy & Sell
SellingBuyingTradingUser Services
Trust & Safety
Middleman LoungeMarketplace TalkVouch Copy Profiles
Money
Cryptocurrency TalkCurrency ExchangeWork & Job Offers
Start selling →List accounts, services, and goods. Use the middleman to trade safe.
MPGH The Dark Arts

A community for offensive security research, reverse engineering, and AI.

Community

ForumMarketplaceSearch

Account

RegisterLog in

Legal

Privacy PolicyForum RulesHelp & FAQ
© 2026 MPGH · All rights reserved.Built by the community, for the community. For educational purposes onlyContent is shared for security research and education — we don't condone illegal use. You're responsible for complying with applicable laws. Use at your own risk.
Home › Forum › Programming › Visual Basic Programming › [Help]Saving settings[Solved]

[Help]Saving settings[Solved]

Posts 1–15 of 37 · Page 1 of 3
Jason
Jason
[Help]Saving settings[Solved]
Okay this is kinda hard to explain so I'll post a pic of my form as well as it may help this make more sense.

Here's my form:


Okay basically it's a game auto-login I'm making for a friend of mine. To give a brief overview of what the program does: You browse for your game .exe using the browse button provided. Then you select your account from the list box and hit the big login button. The button first checks whether the game is running or not, if no it runs the given file path and then inputs the username and password of the given account into the game. If the game is running it simply inputs the account details.

The add account button is pretty self explanatory, you put in your new account password and username and it will save it to the listbox under the given username.

This brings me to the problem I'm having. What I would like to happen is when the person goes to the "Add new account" menu and inputs a username and password and presses "Save Details" I would like the following to happen:

1. The username given to be saved as a new listbox entry (Already done)
2. Have both the username and password saved somewhere so they can be recalled after the form has been shut and re-opened.

Now when the person selects their account from the listbox I would like the "Username" box to come up with the username they inputted for their account and the "Password" textbox to come up with their inputted password (*** out of course but that's simple enough)

So my question is, how do I save their inputted information from the "Add new account" section so that when they choose their username from the listbox, both the username and password will come up in their respective boxes?

Hope someone understands what I'm asking, if you need more information please ask and I shall try and give it to you.

Thanks,

J-Deezy.
#1 · edited 16y ago · 16y ago
niccoletto
niccoletto
It's a bit unsafe, waiting for someone who will test it. I won't do it.
#2 · 16y ago
WT
wtfiwantthatname
Store them internally or in an ini file.
#3 · 16y ago
MJLover
MJLover
Use SaveSetting on exiting the form, and GetSetting on form's load event.

Format is:

Code:
SaveSetting(Application.ProductName,"Settings","ReplaceWithSettingName","ReplaceWithSettingValue")
And GetSetting:

Code:
Dim val as string = GetSetting(Application.ProductName,"Settings","ReplaceWithSettingName","ReplaceWithDefaultValue")
Then assign this value where it belongs !!
#4 · 16y ago
NextGen1
NextGen1
Quote Originally Posted by niccoletto View Post
It's a bit unsafe, waiting for someone who will test it. I won't do it.
It's not even a download
#5 · 16y ago
Jason
Jason
Okay thanks for that MJ I'll test it out when I get home from school. I've also hit another snag, could someone please tell me how to check if a process is already running? I googled around but most of it was some huge code which didn't really relate to what I wanted.

All i want to happen is to have a timer running constantly in the background checking whether the process is running or not and check/uncheck the checkbox accordingly.

Thanks,
J-Deezy
#6 · 16y ago
NextGen1
NextGen1
Create a Function

[php]
Function CheckProcess(ByVal strProcess)
Dim Process, strObject
CheckProcess = False
strObject = "winmgmts://"
For Each Process In GetObject(strObject).InstancesOf("win32_process")
If UCase(Process.name) = UCase(strProcess) Then
CheckProcess = True
' MsgBox("explorer.exe")
Exit Function
End If
Next
End Function
[/php]

Now you can use form load, or a button , or whatever to determine if a process is running

CheckProcess("Process to check for")

Example, If I want to check for explorer.exe

CheckProcess("explorer.exe")

If it is true it will turn on the flag "CheckProcess" , then you do whatever you want

[php]
If CheckProcess=True then
Yada yada
Else
Yada Yada
End If
[/php]

You can ignore the 'MessageBox part, I was testing to be sure it was working right

#7 · 16y ago
Jason
Jason
Thanks, just by looking at it seems to be exactly what I'm looking for. I'm currently sitting in last period so I can't actually test it but I'll be sure to thank you after I give it a test. Been considering how I can use the "SaveSettings" to save each individual account and I think I have a solution haha. We'll see.

Thanks again for all your help.

J-Deezy.
#8 · 16y ago
NextGen1
NextGen1
Not a prob, No need to thank, it's just a button , You already said it .

@ settings, the tut section has 1 or 2 setting tutorials that may help as well.
#9 · 16y ago
Blubb1337
Blubb1337
Quote Originally Posted by NextGen1 View Post
[FONT="Tahoma"]

[php]
Function CheckProcess(ByVal strProcess)
Dim Process, strObject
CheckProcess = False
strObject = "winmgmts://"
For Each Process In GetObject(strObject).InstancesOf("win32_process")
If UCase(Process.name) = UCase(strProcess) Then
CheckProcess = True
' MsgBox("explorer.exe")
Exit Function
End If
Next
End Function
[/php]
[php] Public Function IsProcessOpen(ByVal name As String) As Boolean

For Each clsProcess As Process In Process.GetProcesses

If clsProcess.ProcessName.Contains(name) Then


Return True

End If
Next
' Do nothing
Return False
End Function[/php]

Code:
If Isprocessopen("process") then
whatever
end if
Code:
If not isprocessopen("process") then
whatever
end if
#10 · 16y ago
NextGen1
NextGen1
I like Blubbs version better, effective and clean, good job.

My version can check applications running on a server as well though
#11 · 16y ago
Jason
Jason
Okay thanks for that guys. It's now checking processes perfectly. The only problem I'm having at the moment is if the process is already running, bring it to the topmost window. Because I'm using SendKeys.Send to send the text I need the application to be at the top to successfully get the inputted user/pass.

Is there any way to bring it to top? I've heard that with OS changes microsoft did something to change the old VB code to bring to top and since most tuts i found via google are for VB6 or earlier, they aren't much help.

Cheers,

J-Deezy
#12 · 16y ago
Invidus
Invidus
Me.Topmost = True

That'll bring the form to the top, but you'll need some edits to bring the process. Waiting for NextGen input..
#13 · 16y ago
Jason
Jason
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 )
#14 · edited 16y ago · 16y ago
Jason
Jason
EDIT3: Okay it appears the only way to save the contents of a listbox is to save to a .txt file and get them from there upon form reload. I'm currently googling it at the moment but if anyone wants to provide a quick snippet to save time feel free

Still working on trying to call process to top :@ it's annoying haha, so close to being finished.
#15 · 16y ago
Posts 1–15 of 37 · Page 1 of 3

Post a Reply

Similar Threads

  • [Help]Saving Settings of a form[solved]By poneboy00 in Visual Basic Programming
    9Last post 16y ago
  • [Help]Save Text[Solved]By Shark23 in Visual Basic Programming
    7Last post 16y ago
  • [Help]Saving ListView[Solved]By Lyoto Machida in Visual Basic Programming
    19Last post 15y ago
  • [Help] save settings.By hopefordope in Visual Basic Programming
    12Last post 16y ago
  • [Help]Save track bar settings[Solved]By jajarem64 in Visual Basic Programming
    16Last post 16y ago

Tags for this Thread

None