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] Print Function & Print Preview[Solved]

[HELP] Print Function & Print Preview[Solved]

Posts 1–4 of 4 · Page 1 of 1
Jàzzà_
Jàzzà_
[HELP] Print Function & Print Preview[Solved]
Hey guys this is really quick and simple and want no spamming on the thread
How would i be able to do the Print Function so I can print the text inside my "ListBox" to a printer.
The same go with Print Preview please.
I remember the code was really easy but I haven't made something in VB for quiet a while now so I have forgoten ):

Cheers Jàzzà™ (:
#1 · edited 15y ago · 15y ago
NextGen1
NextGen1
Should Work.

Wrote it up in a new message from outlook, I was writing a email @ the same time.


Add a PrintDialog, and a PrintDocument from your toolbox.

click on the document setting for the PrintDocument and choose printdialog

(Double)Click PrintDocument inside the generated code add

[highlight=vbnet]
Dim x As Integer = e.MarginBounds.Left
Dim y As Single = e.MarginBounds.Top
Dim heightofline As Single = Me.ListBox1.Font.GetHeight(e.Graphics)
For Each item As String In Me.ListBox1.Items
e.Graphics.DrawString(item, Me.ListBox1.Font, Brushes.Black, x, y)
y += heightofline
Next
[/highlight]

In your button, or menu or whatever you are using add

[highlight=vbnet]
If Me.PrintDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then
Me.PrintDocument1.Print()
End If
[/highlight]

Let us know.
#2 · edited 15y ago · 15y ago
Jàzzà_
Jàzzà_
Thank you help was much appreciated,
I should be releasing it quiet soon.
It worked!
#3 · edited 15y ago · 15y ago
NextGen1
NextGen1
Ok, Great. Marked Solved.
#4 · 15y ago
Posts 1–4 of 4 · Page 1 of 1

Post a Reply

Tags for this Thread

None