Move bsNone

Want Cheat Engine to do something specific and no idea how to do that, ask here. (From simple scripts to full trainers and extensions)
Post Reply
User avatar
Kalas
Expert Cheater
Expert Cheater
Posts: 551
Joined: Fri Mar 03, 2017 9:49 am
Reputation: 134

Move bsNone

Post by Kalas »

Hello, I wanted to know If there is a possible way to move a Trainer while It's borderStyle is bsNone, Is there a function for it or something?

User avatar
Matze500
Cheater
Cheater
Posts: 41
Joined: Fri Mar 17, 2017 1:42 am
Reputation: 2

Re: Move bsNone

Post by Matze500 »

You can implement your own with mouse down event. Thats how i am doing it in c# and wpf.

User avatar
Kalas
Expert Cheater
Expert Cheater
Posts: 551
Joined: Fri Mar 03, 2017 9:49 am
Reputation: 134

Re: Move bsNone

Post by Kalas »

Matze500 wrote:
Sun Aug 27, 2017 9:11 pm
You can implement your own with mouse down event. Thats how i am doing it in c# and wpf.
That's what I'm trying to do, like be able to press anywhere on the CETrainer or the Panel to be able to drag the window itself, Is there any way?

panraven
Table Makers
Table Makers
Posts: 121
Joined: Fri Mar 03, 2017 12:03 am
Reputation: 108

Re: Move bsNone

Post by panraven »

CE's form has a DragNow method to simplify the task.
eg.

Code: Select all

local frm = createForm()
frm.Width,frm.Height,frm.Name = 300,100,"TestForm"
frm.OnClose = function()return caFree end -- caFree -> auto destroy form on close
-- frm.BorderStyle = bsNone -- remove comment if ready to test bsNone
--

local prevColor
local Label = createLabel(frm)
Label.AutoSize = false -- set not autosize first, else caption setting may change size
Label.Left,Label.Top,Label.Width,Label.Height = 0,0,30,15
Label.Caption = 'here!'

-- may be useful effect
Label.OnMouseEnter = function(self) -- show move anchor on hover
  self.Caption='MOVE';self.Color,prevColor = 0xccffcc,self.Color
end
Label.OnMouseLeave = function(self) -- hidden on not hover
  self.Caption='';self.Color = prevColor
end

Label.OnMouseDown = function()frm.DragNow()end -- DragNow is a form method

Label.OnDblClick = frm.Destroy-- left a way to destroy form with bsNone
The obj of OnMouseDown to do DragNow can be any ui as long as it has an area to be mouse click, eg the form itself, just make sure the user know how.

User avatar
Kalas
Expert Cheater
Expert Cheater
Posts: 551
Joined: Fri Mar 03, 2017 9:49 am
Reputation: 134

Re: Move bsNone

Post by Kalas »

Yea found Dark Byte reply on CEF:

form_dragNow(formname)

I put on the Panel OnMouseDown and added the function and changed forname to CETrainer or UDF1 depends.

Post Reply

Who is online

Users browsing this forum: No registered users