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]Save track bar settings[Solved]

Question[Help]Save track bar settings[Solved]

Posts 1–15 of 17 · Page 1 of 2
jajarem64
jajarem64
[Help]Save track bar settings[Solved]
I'm trying to figure out how to save my Track bar settings the user chooses, its a slider to adjust the time it takes to inject. Made it in VB 2010 Exp. I want to know the easiest fastest way to do it within the project and it not have to rely on outside sources. If its not possible then just give me the quickest easiest way. I've tried My.Settings method but I just can't seem to get it to work could someone give me a code or a link on how to do it please I've been stuck on it all day!!!!
#1 · 16y ago
Lolland
Lolland
.ini file, or my.settings.
#2 · 16y ago
jajarem64
jajarem64
lolland I know dude but thats what I'm doing My.Settings but I can't get it to work think you could TV me maybe?
#3 · 16y ago
Lolland
Lolland
Try writing it to an .ini file.

It's as easy as this: http://www.mpgh.net/forum/33-visual-...ml#post1964448
#4 · 16y ago
jajarem64
jajarem64
This is what I got. I've tried diffrent codes. Tell me what I need to add or can you just mod the code and paste it.
Code:
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        If TrackBar1.Value = My.Settings.RemInjectTime Then
            My.Settings.RemInjectTime = TrackBar1.Value
            My.Settings.Save()
            My.Settings.Reload()
        End If
            My.Settings.Save()
            My.Settings.Reload()
But I would rather have it in just the app I don't want any outside files
#5 · edited 16y ago · 16y ago
Hassan
Hassan
Use this code. Just tested it and works fine:

First save the settings as you scroll the track bar:

Code:
Private Sub TrackBar1_Scroll(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TrackBar1.Scroll
My.Settings.RemInjectTime = TrackBar1.Value
My.Settings.Save()
My.Settings.Reload()
End Sub
Then when the application is loaded, reload the setting and assign its value to track bar 1:

Code:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If Not My.Settings.RemInjectTime = vbNullString Then
TrackBar1.Value = My.Settings.RemInjectTime
End If
End Sub
Hope this helps !!
#6 · 16y ago
jajarem64
jajarem64
OMFG thank you!!!!! tears OF JOY!!!!!!!!!
#7 · 16y ago
Hassan
Hassan
Quote Originally Posted by jajarem64 View Post
OMFG thank you!!!!! tears OF JOY!!!!!!!!!
Haha, No problem. Glad to help you
#8 · 16y ago
jajarem64
jajarem64
Oh and there is something else I could use some help on my slider is not changing the time for it I thought this would be the right way to do it.
Code:
    Private Sub TrackBar1_Scroll(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TrackBar1.Scroll
        My.Settings.RemInjectTime = TrackBar1.Value
        My.Settings.Save()
        My.Settings.Reload()

        If TrackBar1.Value = 0 Then
            Form2.Timer1.Interval = 5
            If TrackBar1.Value = 1 Then
                Form2.Timer1.Interval = 10
                If TrackBar1.Value = 2 Then
                    Form2.Timer1.Interval = 20
                    If TrackBar1.Value = 3 Then
                        Form2.Timer1.Interval = 30
                        If TrackBar1.Value = 4 Then
                            Form2.Timer1.Interval = 40
                            If TrackBar1.Value = 5 Then
                                Form2.Timer1.Interval = 50
                                If TrackBar1.Value = 6 Then
                                    Form2.Timer1.Interval = 60
                                    If TrackBar1.Value = 7 Then
                                        Form2.Timer1.Interval = 70
                                        If TrackBar1.Value = 8 Then
                                            Form2.Timer1.Interval = 80
                                            If TrackBar1.Value = 9 Then
                                                Form2.Timer1.Interval = 90
                                                If TrackBar1.Value = 10 Then
                                                    Form2.Timer1.Interval = 100
                                                End If
                                            End If
                                        End If
                                    End If
                                End If
                            End If
                        End If
                    End If
                End If
            End If
        End If
    End Sub
#9 · 16y ago
Invidus
Invidus
Shouldn't you be using ElseIf?
#10 · 16y ago
jajarem64
jajarem64
If I am supposed to be using ElseIf then OOOOPS :P and if it works tyVM!

Well it says it has to be followed by a preceeding ElseIf

Someone post the code in here for me please I'm totally confused rofl like I said I'm just a VB beginner.
#11 · edited 16y ago · 16y ago
Hassan
Hassan
Quote Originally Posted by jajarem64 View Post
Oh and there is something else I could use some help on my slider is not changing the time for it I thought this would be the right way to do it.
Code:
    Private Sub TrackBar1_Scroll(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TrackBar1.Scroll
        My.Settings.RemInjectTime = TrackBar1.Value
        My.Settings.Save()
        My.Settings.Reload()

        If TrackBar1.Value = 0 Then
            Form2.Timer1.Interval = 5
            If TrackBar1.Value = 1 Then
                Form2.Timer1.Interval = 10
                If TrackBar1.Value = 2 Then
                    Form2.Timer1.Interval = 20
                    If TrackBar1.Value = 3 Then
                        Form2.Timer1.Interval = 30
                        If TrackBar1.Value = 4 Then
                            Form2.Timer1.Interval = 40
                            If TrackBar1.Value = 5 Then
                                Form2.Timer1.Interval = 50
                                If TrackBar1.Value = 6 Then
                                    Form2.Timer1.Interval = 60
                                    If TrackBar1.Value = 7 Then
                                        Form2.Timer1.Interval = 70
                                        If TrackBar1.Value = 8 Then
                                            Form2.Timer1.Interval = 80
                                            If TrackBar1.Value = 9 Then
                                                Form2.Timer1.Interval = 90
                                                If TrackBar1.Value = 10 Then
                                                    Form2.Timer1.Interval = 100
                                                End If
                                            End If
                                        End If
                                    End If
                                End If
                            End If
                        End If
                    End If
                End If
            End If
        End If
    End Sub
You need to use Else-If command. Right now what ya doing is telling the program that if Trackbar 1's value is 0 then execute rest of the conditional statements.

Use this sub:

[php]Private Sub SetTrackbar(ByVal trackbar As TrackBar, ByVal val As Integer, ByVal interval As Integer)
If trackbar.Value = val Then
form2.Timer1.Interval = interval
End If
End Sub[/php]

Then I would call it in the trackbar_scroll event as:
[php]SetTrackbar(TrackBar1,0,5)
SetTrackbar(TrackBar1,1,10)[/php]

And so on...

The final trackbar_scroll even code should be like this:
[php]Private Sub TrackBar1_Scroll(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TrackBar1.Scroll
My.Settings.RemInjectTime = TrackBar1.Value
My.Settings.Save()
My.Settings.Reload()
SetTrackbar(TrackBar1,0,5)
SetTrackbar(TrackBar1,1,10)
'Add rest of them yourself !!!
End Sub
[/php]

Also you can use loops for it if necessary, but I think this would solve your problem.

EDIT: When you post something, then please wait for an answer. We are not always looking at your posts only. If you don't get a reply PM / VM some user you know can solve your problem. But don't bump as it can lead you to a ban !!!
#12 · edited 16y ago · 16y ago
jajarem64
jajarem64
Yeah sorry for the bumping I don't have a edit button to edit my post and thanks for the help again
#13 · 16y ago
jajarem64
jajarem64
It seems to still be doing the same wait time (50) even tho I changed it to 100 to test if it would be slower.
#14 · 16y ago
Hassan
Hassan
Quote Originally Posted by jajarem64 View Post
It seems to still be doing the same wait time (50) even tho I changed it to 100 to test if it would be slower.
50 = 50 milliseconds
100 = 100 milliseconds


1000 = 1 second

So any value less than 1000 will be in milliseconds...So it will go very fast. But indeed its changing !!!
#15 · 16y ago
Posts 1–15 of 17 · Page 1 of 2

Post a Reply

Similar Threads

  • [Help]Save Text to Desktop[Solved]By ppl2pass in Visual Basic Programming
    8Last post 16y ago
  • [Help] Save Items in Combobox[Solved]By FatCat00 in Visual Basic Programming
    8Last post 16y ago
  • [Help]Save Contents of TextBox[Solved][Closed]By bayley60 in Visual Basic Programming
    2Last post 16y ago
  • [Help] Saving resources to disk?[Solved]By master131 in Visual Basic Programming
    3Last post 15y ago
  • [Help]Saving Settings of a form[solved]By poneboy00 in Visual Basic Programming
    9Last post 16y ago

Tags for this Thread

None