Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Making TPanel unclickable

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
aeree
Cheater
Reputation: 3

Joined: 23 Jan 2010
Posts: 42
Location: Germany

PostPosted: Mon Nov 27, 2017 3:57 pm    Post subject: Making TPanel unclickable Reply with quote

I'm trying to make a cheap crosshair overlay in lazarus. I'm using TPanels
to form the individual lines of the crosshair. The problem I'm having is that
when I move my mouse around in an fps-game the cursor appears when it
moves over one of the panels. Clicking results in losing focus on the game
which sucks immensly.

Is there any way to make them unclickable or to instantly regain focus on the game
when clicking them.

Maybe trying a different method altogehter is better. I already tried using
GDI but I'm too stupid to get double buffering it to work. So any help on that
is also appreciated.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 347

Joined: 09 May 2003
Posts: 20283
Location: The netherlands

PostPosted: Mon Nov 27, 2017 5:23 pm    Post subject: Reply with quote

Not sure there is a way. I think it's a windows thing where clicking on a window brings it to the foreground.

have you tried the d3d->set crosshair option?

or drawing a crosshair using the screen canvas ?

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Back to top
View user's profile Send private message MSN Messenger
aeree
Cheater
Reputation: 3

Joined: 23 Jan 2010
Posts: 42
Location: Germany

PostPosted: Thu Nov 30, 2017 4:11 am    Post subject: Reply with quote

I'm worried about detection so i don't want to use d3d one. I tried using a
PaintBox on the form to draw on and it works Kind of. But the problem
remains. this time anything drawn on the canvas becomes clickable.
I settled with a bevel which outlines the location where the crosshair would
go. it leaves enough space so the mouse never hovers above it when
turning.

it far from what i want though. are there any other form elements that are
unclickable by default?
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 347

Joined: 09 May 2003
Posts: 20283
Location: The netherlands

PostPosted: Thu Nov 30, 2017 4:30 am    Post subject: Reply with quote

You could use this code for an annoying flickering crosshair
Code:

sc=getScreenCanvas()
sc.Pen.Color=0x00ff00 --green
width=getScreenWidth()
height=getScreenHeight()

centerx=width/2
centery=height/2

crosshairsize=4

t=createThread(function(t)
  while t.Terminated==false do
    sc.line(centerx-crosshairsize, centery, centerx+crosshairsize+1,centery)   --horizontal
    sc.line(centerx, centery-crosshairsize, centerx,centery+crosshairsize+1) --vertical
  end
end)


Alternatively, just place a piece of transparent duct tape on the center of your screen and draw a small crosshair in it

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Back to top
View user's profile Send private message MSN Messenger
aeree
Cheater
Reputation: 3

Joined: 23 Jan 2010
Posts: 42
Location: Germany

PostPosted: Thu Nov 30, 2017 9:47 am    Post subject: Reply with quote

The ductape one is the best so far. still worried about detection tho Rolling Eyes
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 347

Joined: 09 May 2003
Posts: 20283
Location: The netherlands

PostPosted: Thu Nov 30, 2017 6:19 pm    Post subject: Reply with quote

only on touchscreens lol
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites