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 


How to make some control backgrounds transparent

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
.lua
Expert Cheater
Reputation: 1

Joined: 13 Sep 2018
Posts: 202

PostPosted: Sun Dec 01, 2019 7:53 am    Post subject: How to make some control backgrounds transparent Reply with quote

As shown in the figure, what is the way to make the background of edit, listbox and memo transparent, just like the label。
There seems to be no transparent property



Control background transparent.png
 Description:
 Filesize:  246.13 KB
 Viewed:  3065 Time(s)

Control background transparent.png


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

Joined: 16 Feb 2017
Posts: 1524

PostPosted: Sun Dec 01, 2019 8:31 am    Post subject: Reply with quote

Just paste the following code into the copy script.

Set Parent.Color tics of all items you want to be transparent to "True".
Sample:

Code:
UDF1.CEMemo1.ParentColor = true
UDF1.CEListBox1.ParentColor = true

UDF1.setLayeredAttributes(0x000100, 250, LWA_COLORKEY | LWA_ALPHA )
--UDF1.BorderStyle=bsNone
UDF1.Color=0x000100

_________________
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: 1668

PostPosted: Sun Dec 01, 2019 8:32 am    Post subject: Reply with quote

This code below will make Listbox transparent, but I don't know-how do transparent foor specific image background.

Code:
form = createForm(true)
form.Position = poDesktopCenter
form.Width = 320
form.Height = 240
form.Color = 0xffffff

pic = createImage(form)
pic.Width = 320
pic.Height = 240
pic.Picture.loadFromStream(findTableFile('test.jpg').Stream)
pic.Stretch = true

e = createListBox(form)
e.Left = 10
e.Top = 10
e.Width = 300
e.OnMouseEnter = function()
if e.Color==0xffffff then
e.Color=0xffffff
else
e.Color=0x000100
end
end


form.setLayeredAttributes(0x000100, 255, LWA_COLORKEY | LWA_ALPHA )




Capture.JPG
 Description:
 Filesize:  93.38 KB
 Viewed:  3050 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
.lua
Expert Cheater
Reputation: 1

Joined: 13 Sep 2018
Posts: 202

PostPosted: Sun Dec 01, 2019 8:59 am    Post subject: Reply with quote

Aylin wrote:
Just paste the following code into the copy script.

Set Parent.Color tics of all items you want to be transparent to "True".
Sample:

Code:
UDF1.CEMemo1.ParentColor = true
UDF1.CEListBox1.ParentColor = true

UDF1.setLayeredAttributes(0x000100, 250, LWA_COLORKEY | LWA_ALPHA )
--UDF1.BorderStyle=bsNone
UDF1.Color=0x000100
But if so, my background image will be transparent, which is not what I want。
As shown in the figure, cegroupbox1 is the background transparent and can see the background image



image.png
 Description:
 Filesize:  292.75 KB
 Viewed:  3038 Time(s)

image.png


Back to top
View user's profile Send private message
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