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 › Set form position to mouse coordinates?

Set form position to mouse coordinates?

Posts 1–14 of 14 · Page 1 of 1
Lolland
Lolland
Set form position to mouse coordinates?
I would like to know how to set the form position to the coordinates of the cursor. Any help will be appreciated.
#1 · 16y ago
Zoom
Zoom
Add this to form1.load :

Code:
Windows.Forms.Cursor.Position = New System.Drawing.Point(Windows.Forms.Cursor.Position)
Then add this code to set the cursor postition!
Code:
 Cursor.Position = New Point(CORDNIANTES HERE, CORDNIANTES HERE)
#2 · 16y ago
jeffrey1
jeffrey1
if your question is how move borderless form -->

under Public class *(form name) put this:
Dim Aloc As New Point(0, 0)
Dim Acur As New Point(0, 0)
after put this:
Private Sub Definitions()
Aloc = Location
Acur = Cursor.Position
End Sub
then add timer and put this in:
Location = Aloc - Acur + Cursor.Position
choose what you need to click to move the form (Picturebox for exemple)
click on picturebox -> events -> MouseDown
add in:
*(timer name).Enabled = True
*(timer name.Start()
Definitions()
now go picturebox -> events - > MouseUp
add in:
*(timer name).Stop()
Definitions()
now you can click on the picturebox and move your mouse to move the form

#3 · 16y ago
trex
trex
Lol? He said "Mouse Coordinates". Thanks guys. I needed to know this and was gonna post soon, but oh well. One thing. How do i find the coordinates and if it was for CA, would each size of game be different?
#4 · 16y ago
Lolland
Lolland
Here is exactly what I want:
I want to be able to move my cursor, and have the form follow it, so that wherever I move my cursor, the form would be, so that the cursor is always in the middle of the form.
#5 · 16y ago
trex
trex
oh. I didnt read it properly. I just guesses u wanted the same thing as me xD Cant help u, soz.
#6 · 16y ago
Zoom
Zoom
I´ll try.....Need some time!
#7 · 16y ago
maarten551
maarten551
i know

how to know the mouse coordinations
Code:
        Dim cx As Integer = Cursor.Position.X
        Dim cy As Integer = Cursor.Position.Y
then made a timer

Code:
*timer
        Dim cx As Integer = Cursor.Position.X
        Dim cy As Integer = Cursor.Position.Y

Me.Location = New Point(cx, cy)
didn't try this

but i think this works :P
#8 · 16y ago
Zoom
Zoom
I made it .
Make a timer
Add this code:
Code:
 Windows.Forms.Cursor.Position = New System.Drawing.Point(Windows.Forms.Cursor.Position)

        Me.Location = Cursor.Position
Please THANK ME
#9 · 16y ago
maarten551
maarten551
Quote Originally Posted by hejsan1 View Post
I made it .
Make a timer
Add this code:
Code:
 Windows.Forms.Cursor.Position = New System.Drawing.Point(Windows.Forms.Cursor.Position)

        Me.Location = Cursor.Position
Please THANK ME
can to
#10 · 16y ago
Lolland
Lolland
Well, I got it, but the problem is is that the mouse is in the top-left corner of the form. Is it possible to put it in the middle?
#11 · edited 16y ago · 16y ago
Lolland
Lolland
Nvm I got it. /close
#12 · 16y ago
Zoom
Zoom
Quote Originally Posted by lolland View Post
Nvm I got it. /close
Double post >.<
#13 · 16y ago
cnttuchme
cnttuchme
Well
Code:
{
    POINT mPos;
    GetCursorPos(&mPos);
    float x = mPos.x;
    float y = mPos.y;
    cout << "X: " << x << " " << "Y: " << y << endl;
}
This can be used to get the coordinates
#14 · 16y ago
Posts 1–14 of 14 · Page 1 of 1

Post a Reply

Similar Threads

  • Need mouse coordinatorBy UxGotxShot in Suggestions, Requests & General Help
    0Last post 16y ago
  • How to find your mouse coordinates!By shawnstuh in Vindictus Tutorials
    0Last post 15y ago
  • Setting Cursor Position According To KeyState [Solved]By BobFM in C++/C Programming
    13Last post 15y ago
  • [Help]Mouse Position coordinatesBy Unkn0wn_h4cker in Visual Basic Programming
    9Last post 16y ago
  • [Help]Saving Settings of a form[solved]By poneboy00 in Visual Basic Programming
    9Last post 16y ago

Tags for this Thread

#coordinates#form#mouse#position#set