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

[Help]Saving ListView[Solved]

Posts 1–15 of 20 · Page 1 of 2
LY
Lyoto Machida
[Help]Saving ListView[Solved]
Im making a program its like a database but without it xD

Its too save all my emails passwords logins etc..
I think is needed 2 save the config and load it when it opens...Idk.
And i want like ..ever i enter in the program the listview items and etc, auto load..
@Jason , @Hassan & @NextGen1 @Blubb1337i need u xD
#1 · edited 15y ago · 15y ago
Blubb1337
Blubb1337
Too bad I'm not in the list, I cannot help you then =D.
#2 · 15y ago
NextGen1
NextGen1
Add Kevin, or I won't help
#3 · 15y ago
LY
Lyoto Machida
Done, But who is kevin ? XDDD
#4 · 15y ago
Blubb1337
Blubb1337
Quote Originally Posted by -WØW'' View Post
Done, But who is kevin ? XDDD
<<< -.-"

[highlight="vb"] Dim File As String = "content.txt"
Dim Delimiter As Char = "|"

Private Sub SaveListview()
Dim full As String = ""

For i = 0 To ListView1.Items.Count - 1
full = ListView1.Items(i).Text & Delimiter & ListView1.Items(i).SubItems(0).Text & vbNewLine
Next

Using sWrite As New IO.StreamWriter(File)
sWrite.Write(full)
End Using
End Sub

Private Sub GetContent()
If IO.File.Exists(File) Then
Using sRead As New IO.StreamReader(File)
While Not sRead.EndOfStream
Dim splitted() As String = Split(sRead.ReadLine, Delimiter)
ListView1.Items.Add(splitted(0))
ListView1.Items(ListView1.Items.Count - 1).SubItems.Add(splitted(1))
End While
End Using
End If
End Sub[/Highlight]

Feel free to modify...
#5 · 15y ago
LY
Lyoto Machida
Quote Originally Posted by Blubb1337 View Post
<<< -.-"

[highlight="vb"] Dim File As String = "content.txt"
Dim Delimiter As Char = "|"

Private Sub SaveListview()
Dim full As String = ""

For i = 0 To ListView1.Items.Count - 1
full = ListView1.Items(i).Text & Delimiter & ListView1.Items(i).SubItems(0).Text & vbNewLine
Next

Using sWrite As New IO.StreamWriter(File)
sWrite.Write(full)
End Using
End Sub

Private Sub GetContent()
If IO.File.Exists(File) Then
Using sRead As New IO.StreamReader(File)
While Not sRead.EndOfStream
Dim splitted() As String = Split(sRead.ReadLine, Delimiter)
ListView1.Items.Add(splitted(0))
ListView1.Items(ListView1.Items.Count - 1).SubItems.Add(splitted(1))
End While
End Using
End If
End Sub[/Highlight]

Feel free to modify...
Im gonna try it now and come back to say what happened :P

Now i know you're kevin xDDD



Edit: @Blubb1337 Your code is good and worked, NOw i just want to know how i add a item in another column please
#6 · edited 15y ago · 15y ago
Blubb1337
Blubb1337
Okay, report back then.

Edit: @Blubb1337 Your code is good and worked, NOw i just want to know how i add a item in
another column please
Let's imagine 3 Columns.

Column 1 = Mainitem
Column 2 = Subitem #0
Column 3 = Subitem #1

[highlight="vb"]Listview1.items.add("Main item")
listview1.items(listview1.items.count - 1).subitems.add("First subitem - column 2")
listview1.items(listview1.items.count - 1).subitems.add("Second subitem - column 3")[/highlight]
#7 · edited 15y ago · 15y ago
LY
Lyoto Machida
Quote Originally Posted by Blubb1337 View Post
Okay, report back then.



Let's imagine 3 Columns.

Column 1 = Mainitem
Column 2 = Subitem #0
Column 3 = Subitem #1

[highlight="vb"]Listview1.items.add("Main item")
listview1.items(listview1.items.count - 1).subitems.add("First subitem - column 2")
listview1.items(listview1.items.count - 1).subitems.add("Second subitem - column 3")[/highlight]
That i know..But the problem is..I want just to add 1 item to 1 column..
I dont want to all columns (That 3)...
#8 · 15y ago
Blubb1337
Blubb1337
Quote Originally Posted by -WØW'' View Post


That i know..But the problem is..I want just to add 1 item to 1 column..
I dont want to all columns (That 3)...
Do you only have 1 column

[highlight="vb"]Listview1.items.add("Text")[/highlight]

or do you have multiple columns and the first column is already filled and you want to edit the selected subcolumn?

[highlight="vb"]If listview1.selecteditems.count <> 0 then
listview1.selecteditems(0).subitems(0).text = "Bla" 'edit first column on selected item
end if[/highlight]

Please explain it more deeply...
#9 · 15y ago
NextGen1
NextGen1
See why you should have added kevin in the first place?

Lesson learned.
#10 · 15y ago
LY
Lyoto Machida
Quote Originally Posted by Blubb1337 View Post
Do you only have 1 column

[highlight="vb"]Listview1.items.add("Text")[/highlight]

or do you have multiple columns and the first column is already filled and you want to edit the selected subcolumn?

[highlight="vb"]If listview1.selecteditems.count <> 0 then
listview1.selecteditems(0).subitems(0).text = "Bla" 'edit first column on selected item
end if[/highlight]

Please explain it more deeply...
lol Kevin i learned new things with you XD

But what im trying to say is: I already have the first and second column..
But i want to add the 3º separated (If you can explain me that..Thanks =))..

IF is 2 hard or something i got a new idea..


@NextGen1 lol Thanks for the lesson xD
#11 · 15y ago
Blubb1337
Blubb1337
Quote Originally Posted by -WØW'' View Post


lol Kevin i learned new things with you XD

But what im trying to say is: I already have the first and second column..
But i want to add the 3º separated (If you can explain me that..Thanks =))..

IF is 2 hard or something i got a new idea..


@NextGen1 lol Thanks for the lesson xD
[highlight="vb"]listview1.items(listview1.items.count - 1).subitems(1).text = "I guess I got it"[/highlight]

[highlight="vb"]listview1.items(0).subitems(1).text = "I guess I got it" 'edit 3rd column of 1st item in listview[/highlight]

???
#12 · edited 15y ago · 15y ago
LY
Lyoto Machida
Testing, Editing this soon..

First code error: InvalidArgument=Value of '-1' is not valid for 'index'.
Parameter name: index

Second code error: InvalidArgument=Value of '0' is not valid for 'index'.
Parameter name: index





#13 · edited 15y ago · 15y ago
Blubb1337
Blubb1337
Quote Originally Posted by -WØW'' View Post
Testing, Editing this soon..

First code error: InvalidArgument=Value of '-1' is not valid for 'index'.
Parameter name: index

Second code error: InvalidArgument=Value of '0' is not valid for 'index'.
Parameter name: index

Does your listview even contain any item?

If you are trying to edit the 3rd column without having an item added that won't work.

If you actually did that. First add an empty item like.

[highlight="vb"]Listview1.items.add("")[/highlight]
#14 · 15y ago
LY
Lyoto Machida
Quote Originally Posted by Blubb1337 View Post
Does your listview even contains any item?

If you are trying to edit the 3rd column without having an item added that won't work.

If you actually did that. First add an empty item like.

[highlight="vb"]Listview1.items.add("")[/highlight]
Ok, So i will do the other way what u said...

Im gonna do a form with this:

Code:
Form1.ListView1.Items.Add(login.Text)
        Form1.ListView1.Items(Form1.ListView1.Items.Count - 1).SubItems.Add(email.Text)
        Form1.ListView1.Items(Form1.ListView1.Items.Count - 1).SubItems.Add(password.Text)
        Form1.ListView1.Items(Form1.ListView1.Items.Count - 1).SubItems.Add(website.Text)
And i think is working...
PS: I edited your subs bcuz of a problem but now is solved =)

Solved =)

Thank you blubb!
#15 · 15y ago
Posts 1–15 of 20 · Page 1 of 2

Post a Reply

Tags for this Thread

None