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]UserControl[Solved]

[Help]UserControl[Solved]

Posts 1–15 of 16 · Page 1 of 2
Samueldo
Samueldo
[Help]UserControl[Solved]
Argh here we go again. For each user control in the form I want to get the data stored in it's textbox and listview.

Here's the code I'm using now:
[PHP] For Each meh In Tabs.Tabs
For Each ctrl In meh.AttachedControl.Controls
Select Case ctrl.GetType.ToString
Case "Instinct.Inner"
Try
MsgBox(ctrl.Controls.ProcessBox.Text)
Dim x As Integer = ctrl.tn + 1
If IO.File.Exists(Application.StartupPath + "\tab" + x.ToString + ".ini") Then
IO.File.Delete(Application.StartupPath + "\tab" + x.ToString + ".ini")
End If
Dim sw As IO.StreamWriter
sw = New IO.StreamWriter(Application.StartupPath + "\tab" + x.ToString + ".ini")
sw.WriteLine(ctrl.ProcessBox.Text)
For Each hack In ctrl.HackList.Items
sw.WriteLine(hack.ToString)
Next
sw.Close()
Catch ex As Exception
Dim x As Integer = ctrl.tn + 1
MsgBox("Error saving data for tab " + x.ToString + " of " + t.ToString + ". Error: " + ex.Message, MsgBoxStyle.Critical, "InjectPlz INSTINCT")
End Try
End Select
Next
Next[/PHP]

Definitions:
Tabs - DotNetBar SuperTabControl
"Instinct.Inner" - The usercontrol I'm trying to access
tn - A number used to find the tab's position
ProcessBox - the textbox I'm trying to get data from
HackList - the listview I'm trying to get data from

Now, I know why this is happening, it's because for some reason you can't access the UserControl's controls. So does anyone know a way you CAN access them so this code will work?

If I have forgotten to mention or explain anything just say, I will tell you.
Yes this is for InjectPlz.

Thanks in advance
#1 · 16y ago
Imported
Imported

What would really help is an explanation on what you're ultimate goal is, there's probably a much easier method to achieve what you're looking for without needing to access each user control.

EDIT: This doesn't really help much with your problem but I noticed a little clumsy bit in your code (aside from the rest )

[php]
If IO.File.Exists(Application.StartupPath + "\tab" + x.ToString + ".ini") Then
IO.File.Delete(Application.StartupPath + "\tab" + x.ToString + ".ini")
End If
Dim sw As IO.StreamWriter
sw = New IO.StreamWriter(Application.StartupPath + "\tab" + x.ToString + ".ini")
sw.WriteLine(ctrl.ProcessBox.Text)
For Each hack In ctrl.HackList.Items
sw.WriteLine(hack.ToString)
Next
[/php]

This would do exactly the same thing!

[php]
Using sw As new IO.StreamWrite(Application.StartupPath + "\tab" + x.ToString + ".ini", False)
sw.WriteLine(ctrl.ProcessBox.Text)

For Each hack In ctrl.HackList.Items
sw.WriteLine(hack.ToString)
Next

End Using
[/php]

Yeah, no need to check if the ini exists, delete it and rewrite it, simply set "Append" to false and it will automatically clear all it's previous contents. Also, Using/End Using is much more efficient than "Dim sw As ..." and remembering to put "sw.Close()"
#2 · edited 16y ago · 16y ago
Samueldo
Samueldo
Dammit my post got deleted.

My goal: Save the data of each UserControl (the textbox and listview contents) in the form in a text file.

And thanks for the code, I'll remember to use it
#3 · 16y ago
Imported
Imported
Quote Originally Posted by Samueldo View Post
Dammit my post got deleted.

My goal: Save the data of each UserControl (the textbox and listview contents) in the form in a text file.

And thanks for the code, I'll remember to use it
Great my post also got deleted . Anyways my last question was, doesn't each control inside each tab have it's own unique name? (I'm not very familiar with dotnetbar.
#4 · 16y ago
Lolland
Lolland
Neither of your posts were deleted by minions/mods, it was a database error.
#5 · 16y ago
Imported
Imported
Quote Originally Posted by lolland View Post
Neither of your posts were deleted by minions/mods, it was a database error.
Yeah, we know, we were just commenting on the irritation of having to repost

Your avatar made me think you were HD Alex
#6 · 16y ago
Lolland
Lolland
Quote Originally Posted by Imported View Post


Yeah, we know, we were just commenting on the irritation of having to repost

Your avatar made me think you were HD Alex
Oh okay, just making sure.

@Offtopic:

Is this solved?
#7 · 16y ago
Jason
Jason
Quote Originally Posted by lolland View Post


Oh okay, just making sure.

@Offtopic:

Is this solved?
I don't think it is, but I don't know. Perhaps they MSN'd each other? /
#8 · 16y ago
Imported
Imported
Quote Originally Posted by J-Deezy View Post


I don't think it is, but I don't know. Perhaps they MSN'd each other? /
Nah not quite yet, just waiting for Samueldo to get back I'll let you know when it gets solved Lolland.
#9 · 16y ago
Samueldo
Samueldo
When Imported's online I'm always asleep, that's why it's taking forever :L

Yeah each control has it's own name. But the user can create more controls or remove them. I put this code in the FormClosing event so it gets the data of any controls that are present when the user closes the form.
#10 · 16y ago
Imported
Imported
Hmm, this may take a while for me to figure out seeing as I'm taking stabs in the dark, I think things would go a lot faster if you have TV, do you?
#11 · 16y ago
Samueldo
Samueldo
Quote Originally Posted by Imported View Post
Hmm, this may take a while for me to figure out seeing as I'm taking stabs in the dark, I think things would go a lot faster if you have TV, do you?
Let me just re-set it up. My MSN is randomsmallperson@hotmail.co.uk and I'll give you my TV info there.
#12 · 16y ago
Imported
Imported
Okay, I got it all sorted pretty much, shouldn't take too much tweaking to get it to work with your UserControl, but we'll see.
#13 · 16y ago
Samueldo
Samueldo
Okay this is solved :P
#14 · 16y ago
Jason
Jason
Haha after about 15 minutes of browsing intellisense that is /
#15 · 16y ago
Posts 1–15 of 16 · Page 1 of 2

Post a Reply

Similar Threads

  • Please help me solve the hackers!By j148148 in Alliance of Valiant Arms (AVA) Help
    2Last post 15y ago
  • [Help]Progressbar[Solved]By Shocker2010 in Visual Basic Programming
    2Last post 16y ago
  • [Help]PictureBox[Solved]By zmansquared in Visual Basic Programming
    6Last post 16y ago
  • [Help]CheckBox[Solved]By ppl2pass in Visual Basic Programming
    1Last post 16y ago
  • [help]MSGBOX[Solved]By Kollie8ice in Visual Basic Programming
    8Last post 16y ago

Tags for this Thread

None