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] Draw direct to screen.

[HELP] Draw direct to screen.

Posts 1–7 of 7 · Page 1 of 1
Jason
Jason
[HELP] Draw direct to screen.
Well I'm stuck,

I've been googling. experimenting, inventing and nothing has worked so far.

What I'm attempting to do, is draw directly to screen display. I get the feeling this could be impossible so my first question is, "Is this possible or not?". If so, my second question is "How?"

I've been trying for a while, attempting to create a device context for the screen display. But I don't know if this is even the right approach to go for. Here's what I've been working with atm.

[php]
Imports System.Runtime****teropServices

Public Class Form1

Dim ScreenDC As IntPtr

<DllImport("Gdi32.dll")> _
Public Shared Function CreateDC(ByVal driverName As String, ByVal deviceName As String, ByVal output As String, ByVal lpInitData As IntPtr) As IntPtr
End Function

<DllImport("Gdi32.dll")> _
Public Shared Function DeleteDC(ByVal dc As IntPtr) As Boolean
End Function

Dim sWidth = Screen.PrimaryScreen.Bounds.Width
Dim sHeight = Screen.PrimaryScreen.Bounds.Height

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click


ScreenDC = CreateDC("DISPLAY", Nothing, Nothing, CType(Nothing, IntPtr))

Dim mg As Graphics = Graphics.FromHdc(ScreenDC)
Dim rPen As New Pen(Color.Red, 1)

mg.DrawLine(rPen, sWidth, (sHeight - 25), sWidth, (sHeight + 25))
mg.DrawLine(rPen, (sWidth - 25), sHeight, (sWidth + 25), sHeight)


End Sub
Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing

DeleteDC(ScreenDC)

End Sub
End Class
[/php]

I've been trying to adapt snippets i've used for various other projects I've made over time and somehow get this to work. (i.e the ScreenDC was something I used for a ScreenScanner a while back)

At the moment I'm trying to draw pretty much a crosshair on the screen, nothing happens however when I press Button1. I wasn't fully expecting this code to work, but I'm out of ideas.

Anyone got an idea of how to go about this?

Cheers,

J-Deezy.
#1 · edited 16y ago · 16y ago
QD
qddW$#%^jtyjtyj
Well it possible... I remember i did it, i got the source from Zoom so.. Ask him
#2 · 16y ago
aLcohoL_95
aLcohoL_95
make a transparent forum
/ just an idea
#3 · edited 16y ago · 16y ago
GO
Golden.
That is a good idea ^
Make a transparent full screen form and just draw on that..
#4 · 16y ago
Blubb1337
Blubb1337
He needs it to be working in DirectX Game...
#5 · 16y ago
Kallisti
Kallisti
Drawing direct to screen can cause Flicker? Use double buffer? /
#6 · 16y ago
Jason
Jason
Quote Originally Posted by Golden. View Post
That is a good idea ^
Make a transparent full screen form and just draw on that..
Lol, you can't be serious. That wouldn't work for anything fullscreen.

Ontopic: I can draw direct to the DirectX Game by obtaining the window handle and then drawing to the window handle, however the game renders frames too fast and seeing as I haven't hooked anything my crosshair just flickers hell bad. So either I need to draw direct to screen display or figure out how to hook to Endscene with VB
#7 · 16y ago
Posts 1–7 of 7 · Page 1 of 1

Post a Reply

Similar Threads

  • [Help] Drawing pixels on screen?[Solved]By master131backup in Visual Basic Programming
    14Last post 15y ago
  • Need help How crate login screen???By ignas2297 in CrossFire Mods & Rez Modding
    5Last post 16y ago
  • [Help]PopUp Form Center Screen[Solved]By tremaster in Visual Basic Programming
    15Last post 16y ago
  • [Help] Draw in the center?By mastermods in Combat Arms Hack Coding / Programming / Source Code
    3Last post 16y ago
  • [Help]WarRock Korean Error ScreenBy dor619 in WarRock Korea Hacks
    2Last post 19y ago

Tags for this Thread

None