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] Deleting drawn graphics

[Help] Deleting drawn graphics

Posts 1–9 of 9 · Page 1 of 1
Jason
Jason
[Help] Deleting drawn graphics
Hey guys, I'm using this code to draw an ellipse at the point the cursor is currently at.

[php]
Private Sub Form1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseMove

Dim myGraphics As Graphics


myGraphics = Graphics.FromHwnd(ActiveForm().Handle)

myGraphics.DrawEllipse(pen:=New Pen(Color.Green), _
rect:=New Rectangle(x:=(e.X - 35), y:=(e.Y - 35), Width:=70, Height:=70))

myGraphics.Dispose()


End Sub
[/php]

However, I need it to first delete the previously drawn graphic from the form before drawing then next one as this is the effect im currently getting.



But what I want is just for a circle to follow the pointer wherever it goes.

Help?
#1 · 16y ago
'Bruno
'Bruno
i guess you can just clear the whole form.

(Event mouse move)
Clear all (xx.Clear(color) if not wrong..)
Draw new circle

Code:
Private Sub Form1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseMove

        Dim myGraphics As Graphics


        myGraphics = Graphics.FromHwnd(ActiveForm().Handle)

        myGraphics.Clear(Color.Green)

        myGraphics.DrawEllipse(pen:=New Pen(Color.Green), _
        rect:=New Rectangle(x:=(e.X - 35), y:=(e.Y - 35), Width:=70, Height:=70))

        myGraphics.Dispose()


    End Sub
like this or so.. not quite sure since i dont code in Vb.
#2 · edited 16y ago · 16y ago
Jason
Jason
That just makes the form go completely green O.o
#3 · 16y ago
'Bruno
'Bruno
Quote Originally Posted by J-Deezy View Post
That just makes the form go completely green O.o
ups.. Color.White (form color) <.< or W/e ur form color is.
#4 · 16y ago
Jason
Jason
Quote Originally Posted by Brinuz View Post
ups.. Color.White (form color) <.< or W/e ur form color is.
Brilliant, thanks a lot (i used "Me.BackColor")
#5 · 16y ago
'Bruno
'Bruno
Quote Originally Posted by J-Deezy View Post
Brilliant, thanks a lot (i used "Me.BackColor")
even better p
#6 · 16y ago
ViittO
ViittO
why you have it on mouse move??
change it to mouse down and mouse up
#7 · 16y ago
'Bruno
'Bruno
Quote Originally Posted by ViittO View Post
why you have it on mouse move??
change it to mouse down and mouse up
what the hell.. dude. maybe because he doesnt want an event click? he just want it to get it draw around his mouse.
#8 · 16y ago
Jason
Jason
Quote Originally Posted by Brinuz View Post
what the hell.. dude. maybe because he doesnt want an event click? he just want it to get it draw around his mouse.
Exactly. I'm doing a basic shooting game so I need to draw the crosshair at cursor as it moves.
#9 · 16y ago
Posts 1–9 of 9 · Page 1 of 1

Post a Reply

Similar Threads

  • help with ram/graphicsBy owenh1 in General
    17Last post 16y ago
  • [help]Deleting first 2 charecters DWORDBy lauwy in C++/C Programming
    6Last post 16y ago
  • [Help]deleting / replacingBy /b/oss in Visual Basic Programming
    15Last post 15y ago
  • [Help] Deleting files permanently[Solved]By nathanael890 in Visual Basic Programming
    9Last post 15y ago
  • [Help]Delete CopiesBy HalfBajan in Visual Basic Programming
    10Last post 15y ago

Tags for this Thread

None