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 


Is it possible to hide the GroupBox borders in Trainer?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
AylinCE
Grandmaster Cheater Supreme
Reputation: 31

Joined: 16 Feb 2017
Posts: 1234

PostPosted: Sun Feb 04, 2018 11:02 am    Post subject: Is it possible to hide the GroupBox borders in Trainer? Reply with quote

I tried many options and finally I wanted to ask here. Sad
I want to hide the GroupBox borders on the trainer.
I need information on this. Rolling Eyes
Thanks in advance.

_________________
Hi Hitler Different Trainer forms for you!
https://forum.cheatengine.org/viewtopic.php?t=619279
Enthusiastic people: Always one step ahead
Do not underestimate me Master: You were a beginner in the past
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
FreeER
Grandmaster Cheater Supreme
Reputation: 53

Joined: 09 Aug 2013
Posts: 1091

PostPosted: Sun Feb 04, 2018 1:42 pm    Post subject: Reply with quote

As far as I can tell from google (CE is based on lazarus/delphi), you can't, use a panel instead.
Back to top
View user's profile Send private message
AylinCE
Grandmaster Cheater Supreme
Reputation: 31

Joined: 16 Feb 2017
Posts: 1234

PostPosted: Sun Feb 04, 2018 2:03 pm    Post subject: Reply with quote

[img]https://prntscr.com/ia2v7r[/img]

Instead of hiding the button for each page that is opened,
only the GroupBox will save space in Lua.
But the frame lines break the view. Sad

Will the panel be transparent?
Photos supposed to appear in the background! Rolling Eyes

In the meantime, I published a CT formed with your help

http://forum.cheatengine.org/viewtopic.php?t=606786

Again Thanks..

_________________
Hi Hitler Different Trainer forms for you!
https://forum.cheatengine.org/viewtopic.php?t=619279
Enthusiastic people: Always one step ahead
Do not underestimate me Master: You were a beginner in the past
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
FreeER
Grandmaster Cheater Supreme
Reputation: 53

Joined: 09 Aug 2013
Posts: 1091

PostPosted: Sun Feb 04, 2018 2:11 pm    Post subject: Reply with quote

You can group components inside of a panel just like a groupbox but with some different settings for the border.

Back to top
View user's profile Send private message
AylinCE
Grandmaster Cheater Supreme
Reputation: 31

Joined: 16 Feb 2017
Posts: 1234

PostPosted: Sun Feb 04, 2018 2:36 pm    Post subject: Reply with quote

FreeER wrote:
You can group components inside of a panel just like a groupbox but with some different settings for the border.



I apologize, I can not reach the picture you shared.
To make the panel transparent and to hide the çeevevesine
If you need an encoding, it surpasses me with more.
In that case, the GroupBox framework is ideal for me. Rolling Eyes

https://prntscr.com/ia3ita

Thanks for the answer.
Maybe next time I get to experience to solve Sad

_________________
Hi Hitler Different Trainer forms for you!
https://forum.cheatengine.org/viewtopic.php?t=619279
Enthusiastic people: Always one step ahead
Do not underestimate me Master: You were a beginner in the past
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
FreeER
Grandmaster Cheater Supreme
Reputation: 53

Joined: 09 Aug 2013
Posts: 1091

PostPosted: Sun Feb 04, 2018 3:56 pm    Post subject: Reply with quote

hm, this setup almost seems to work but you can't click the buttons (can still tab select them however)... had trouble just getting that to do as intended since if the form color was the same as the panel color then you wouldn't see the image behind the panel ...

anyways, the basic concept was to put a groupbox inside of a smaller panel so that the border is clipped by the bounding box of the panel.

https://www.dropbox.com/s/8tzweylpl3ar9ks/transparent%20panel.CT?dl=0

I've never really messed with CE's GUI stuff because I simply don't make trainers. This kind of makes me think anyone who really wants nice trainers would probably be better off learning how to make a trainer outside of CE where they can get more control (make custom lazarus types based on the ones you want or use an entirely different language and GUI controls)... though perhaps there's some simple logic that someone who actually works with GUIs would know and understand Very Happy
Back to top
View user's profile Send private message
AylinCE
Grandmaster Cheater Supreme
Reputation: 31

Joined: 16 Feb 2017
Posts: 1234

PostPosted: Sun Feb 04, 2018 5:31 pm    Post subject: Reply with quote

UDF1 and Panel are hidden. fantastic job in 17 rows .. Shocked

but I can not use a timer. Filled with Lua timer and overlaps.
You did a good job at CT. I'll just try to practice without the panel timer.
Thank you.

_________________
Hi Hitler Different Trainer forms for you!
https://forum.cheatengine.org/viewtopic.php?t=619279
Enthusiastic people: Always one step ahead
Do not underestimate me Master: You were a beginner in the past
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Corroder
Grandmaster Cheater Supreme
Reputation: 75

Joined: 10 Apr 2015
Posts: 1667

PostPosted: Sun Feb 04, 2018 7:00 pm    Post subject: Reply with quote

My test :

Code:
function RGBToHex(red, green, blue)
 if(red < 0 or red > 255 or green < 0 or green > 255 or blue < 0 or blue > 255) then
 return nil
 end
 return string.format("0x%.2X%.2X%.2X", red,green,blue)
end

f = createForm()
f.color = RGBToHex(50, 142, 25)
f.setLayeredAttributes(RGBToHex(50, 142, 25), 200, 2)

gb = createPanel(f)
gb.left =30
gb.top = 30
gb.height = 100
gb.BorderStyle = bsNone
gb.BevelWidth = 0
gb.BevelOuter = bvRaised
gb.BevelInner = bvRaised
gb.color = RGBToHex(10, 24, 25)
gb.setLayeredAttributes(RGBToHex(10, 24, 25), 200, 2)
gb.Visible = true

l1 = createLabel(gb)
l1.left = 5
l1.top = 5
l1.caption = 'Test label 1'
l1.font.size = 12
l1.font.stye = 'fsBold'
l1.font.color = RGBToHex(70, 125, 125)
--l1.setLayeredAttributes(RGBToHex(70, 125, 125), 255, 3)

cb = createCheckBox(f)
cb.left = gb.left + gb.width + 10
cb.top = gb.top
cb.caption = 'Show/Hide'


function cbChange()
 if cb.Checked then
   gb.Visible = false
 else
   gb.Visible = true
 end
end

cb.onChange = cbChange
f.show()



Capture1.JPG
 Description:
Test transparent panel
 Filesize:  16.91 KB
 Viewed:  6631 Time(s)

Capture1.JPG



_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL
Back to top
View user's profile Send private message
AylinCE
Grandmaster Cheater Supreme
Reputation: 31

Joined: 16 Feb 2017
Posts: 1234

PostPosted: Mon Feb 05, 2018 2:03 am    Post subject: Reply with quote

Corroder wrote:
My test :

Code:
function RGBToHex(red, green, blue)
 if(red < 0 or red > 255 or green < 0 or green > 255 or blue < 0 or blue > 255) then
 return nil
 end
 return string.format("0x%.2X%.2X%.2X", red,green,blue)
end

f = createForm()
f.color = RGBToHex(50, 142, 25)
f.setLayeredAttributes(RGBToHex(50, 142, 25), 200, 2)

gb = createPanel(f)
gb.left =30
gb.top = 30
gb.height = 100
gb.BorderStyle = bsNone
gb.BevelWidth = 0
gb.BevelOuter = bvRaised
gb.BevelInner = bvRaised
gb.color = RGBToHex(10, 24, 25)
gb.setLayeredAttributes(RGBToHex(10, 24, 25), 200, 2)
gb.Visible = true

l1 = createLabel(gb)
l1.left = 5
l1.top = 5
l1.caption = 'Test label 1'
l1.font.size = 12
l1.font.stye = 'fsBold'
l1.font.color = RGBToHex(70, 125, 125)
--l1.setLayeredAttributes(RGBToHex(70, 125, 125), 255, 3)

cb = createCheckBox(f)
cb.left = gb.left + gb.width + 10
cb.top = gb.top
cb.caption = 'Show/Hide'


function cbChange()
 if cb.Checked then
   gb.Visible = false
 else
   gb.Visible = true
 end
end

cb.onChange = cbChange
f.show()


>>>>>>>>>>>>
Nice design Correder. Thank you for offering options.
There's also Transparent color coding in Lua. 2. coding overlap? Rolling Eyes
I shortened the coding and tried it. (Lua won the field)
But the background image still does not appear.
Also an additional encoding is the extra Lua area for 20 windows.
I explained the alternative results in the picture.
I have to choose one and they are both problematic.
Still, the limit of the GroupBox is appealing. Sad

[img]https://prntscr.com/ia9ogu[/img]

_________________
Hi Hitler Different Trainer forms for you!
https://forum.cheatengine.org/viewtopic.php?t=619279
Enthusiastic people: Always one step ahead
Do not underestimate me Master: You were a beginner in the past
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Corroder
Grandmaster Cheater Supreme
Reputation: 75

Joined: 10 Apr 2015
Posts: 1667

PostPosted: Mon Feb 05, 2018 7:37 pm    Post subject: Reply with quote

Doesn't look as you want, but since I've not found any references to make object transparent or setting opacity an object in pure Lua and CE only support for form transparent, I tried to make it using form as a button.

Code:
function dragByfrm()
 frm2.destroy()
 frm.DragNow()
 frmAsbutton()
end

function frmClick2Exit()
 closeCE()
 return caFree
end

frm = createForm()
frm.height = 300
frm.witdh = 300
frm.BorderStyle = bsNone
frm.Caption = 'Main Form'
frm.Position = poScreenCenter
frm.color = 0xD8F5F5
frm.setLayeredAttributes(0xD8F5F5, 255, 3)
frm.OnMouseDown = dragByfrm

pnl = createPanel(frm)
pnl.top = 10
pnl.left = 10
pnl.height = frm.height - 10
pnl.width = frm.width - 10
pnl.BevelWidth = 0
pnl.BevelInner = bvRaised
pnl.BevelOuter = bvRaised
pnl.BorderStyle = bsNone
pnl.color = 0xD8F5F5
pnl.setLayeredAttributes(0xD8F5F5, 255, 3)
pnl.OnMouseDown = dragByfrm

bgr = createImage(pnl)
bgr.width = pnl.width
bgr.height = pnl.height
bgr.Stretch = true
bgr.cursor = -21
bgr.Picture.loadFromStream(findTableFile('Hulk2.png').Stream)
bgr.OnMouseDown = dragByfrm

function frmAsbutton()
 frm2 = createForm()
 frm2.left = frm.left + 10
 frm2.top = frm.top + 100
 frm2.width = 100
 frm2.height = 60
 frm2.BorderStyle = bsNone
 frm2.color = 0x00976767
 frm2.AlphaBlend = true
 frm2.AlphaBlendValue = 200
 frm2.Visible = true
 lb1 = createLabel(frm2)
 lb1.left = 10
 lb1.top = 20
 lb1.caption = 'Close Trainer'
 lb1.font.size = 10
 lb1.font.stye = 'fsBold'
 lb1.font.color = 0xFFFFFF
 lb1.cursor = -21
 lb1.onClick = frmClick2Exit
end

frmAsbutton()
frm.show()   



The logic for sample above is 'form overlay'



Capture.JPG
 Description:
Form overlay as a transparent button
 Filesize:  27.8 KB
 Viewed:  6568 Time(s)

Capture.JPG



_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

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

PostPosted: Tue Feb 06, 2018 2:31 am    Post subject: Reply with quote

object transparancy should work on windows8 and later using wincontrol.setLayeredAttributes. , but not on win7 though
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
Corroder
Grandmaster Cheater Supreme
Reputation: 75

Joined: 10 Apr 2015
Posts: 1667

PostPosted: Tue Feb 06, 2018 5:53 am    Post subject: Reply with quote

Oh, I see. Thanks DB for tell.. Smile
_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL
Back to top
View user's profile Send private message
AylinCE
Grandmaster Cheater Supreme
Reputation: 31

Joined: 16 Feb 2017
Posts: 1234

PostPosted: Tue Feb 06, 2018 9:43 am    Post subject: Reply with quote

Dark Byte wrote:
object transparancy should work on windows8 and later using wincontrol.setLayeredAttributes. , but not on win7 though


After your explanation, it's pointless to investigate further.
thanks DarkByte.
I hope it may be possible to hide the Border lines for the GroupBox,
  in another version. Rolling Eyes

Thank you Correder. I have installed 7 games with GroupBox into the trainer,
8 games remain and I keep going.
You and FreeER, you did not leave me alone.
You are helpful and honorable masters.
You've always supported, I will try to be worthy of this trust.
Thanks again.

_________________
Hi Hitler Different Trainer forms for you!
https://forum.cheatengine.org/viewtopic.php?t=619279
Enthusiastic people: Always one step ahead
Do not underestimate me Master: You were a beginner in the past
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting 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