|
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
Corroder Grandmaster Cheater Supreme Reputation: 75
Joined: 10 Apr 2015 Posts: 1667
|
|
Back to top |
|
|
Corroder Grandmaster Cheater Supreme Reputation: 75
Joined: 10 Apr 2015 Posts: 1667
|
Posted: Mon Aug 31, 2020 10:07 am Post subject: |
|
|
Another test with form glass effect
Description: |
Glass Effect with blue bg |
|
Filesize: |
58.51 KB |
Viewed: |
1385 Time(s) |
|
Description: |
Glass Effect with black bg |
|
Filesize: |
59.3 KB |
Viewed: |
1385 Time(s) |
|
_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL |
|
Back to top |
|
|
.lua Expert Cheater Reputation: 1
Joined: 13 Sep 2018 Posts: 189
|
Posted: Mon Aug 31, 2020 10:34 am Post subject: |
|
|
Corroder wrote: | Another test with form glass effect | Can glass effect, form translucency, label partial translucency and borderless shadow be realized in ce7.1? Can you upload a CT for me to test?
|
|
Back to top |
|
|
Corroder Grandmaster Cheater Supreme Reputation: 75
Joined: 10 Apr 2015 Posts: 1667
|
Posted: Mon Aug 31, 2020 11:24 am Post subject: |
|
|
@lua : Here is the script:
Code: | function DwmExtendFrameIntoClientArea(hWnd, pMarInset)
return executeCodeLocalEx("dwmapi.DwmExtendFrameIntoClientArea", hWnd, pMarInset)
end
function DwmEnableBlurBehindWindow(hwnd, ref)
return executeCodeLocalEx("dwmapi.DwmEnableBlurBehindWindow", hWnd, ref)
end
function DwmIsCompositionEnabled(en)
return executeCodeLocalEx("dwmapi.DwmIsCompositionEnabled",en)
end
function DwmSetWindowAttribute(hwnd, attr, attrValue, attrSize)
return executeCodeLocalEx("dwmapi.DwmSetWindowAttribute", hwnd, attr, attrValue, attrSize)
end
function glassForm(hwnd, Ver, v, l, r, t, b)
DwmSetWindowAttribute(hwnd, 2, v, 4)
margins = createMemoryStream()
margins.writeDword(l)
margins.writeDword(r)
margins.writeDword(t)
margins.writeDword(b)
DwmIsCompositionEnabled(Ver)
DwmExtendFrameIntoClientArea(hwnd, margins.Memory)
end
function SetClassLong(hwnd, nIndex, dwNewLong)
return executeCodeLocalEx("user32.SetClassLongA", hwnd, nIndex, dwNewLong)
end
function GetClassLong(hwnd, nIndex, dwNewLong)
return executeCodeLocalEx("user32.GetClassLongA", hwnd, nIndex)
end
CS_DropSHADOW = 0x20000
GCL_STYLE = (-26)
------------------------------------------------------
if f then f.destroy() end
f = createForm()
f.Position = 'poScreenCenter'
f.BorderStyle = 'bsNone'
f.setSize(500,400)
f.color = 16760576
p1 = createLabel(f)
p1.setPosition(28,140)
p1.color = 0
local p = {}
function Command1_Click()
CurrentX,CurrentY = p1.getPosition()
a = CurrentX
b = CurrentY
for i = 1, 20 do
p[i] = createLabel(f)
p[i].Font.Size = 48
p[i].Font.Color = 0
p[i].Caption = "CHEAT ENGINE"
a = a + 0.5
b = b + 0.5
CurrentX = a
CurrentY = b
p[i].setPosition(CurrentX,CurrentY)
if i == 20 then p[i].Font.Color = 0xffffff end
end
end
DWM_BLURBEHIND = {dwFlags, fEnable, hRgnBlur, fTransitionOnMaximized}
DWM_BB_ENABLE = 0x1
DWM_BB_BLURREGION = 0x2
DWM_BB_TRANSITIONONMAXIMIZED = 0x4
bb = DWM_BLURBEHIND
bb.dwFlags = 1
bb.fEnable = true
bb.hRgnBlur = nil
f.color = 16760576
DwmEnableBlurBehindWindow(f.Handle, bb)
glassForm(f.handle, 6.2, 2, -1,-1,-1,-1)
SetClassLong(f.Handle, GCL_STYLE, GetClassLong(f.Handle, GCL_STYLE) | CS_DropSHADOW)
Command1_Click()
f.show()
f.OnMouseDown = function() f.dragNow() end
Command1_Click()
|
_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL |
|
Back to top |
|
|
.lua Expert Cheater Reputation: 1
Joined: 13 Sep 2018 Posts: 189
|
Posted: Tue Sep 01, 2020 3:39 am Post subject: |
|
|
Corroder wrote: | @lua : Here is the script:Your function failed my test.
Code: | glassForm(f.handle, 6.2, 2, -1,-1,-1,-1) |
The above function prompts this:(Error:Access violation)
I have a few more questions to explain:
first: Code: | f.FormStyle='fsSystemStayOnTop' | Shadows do not appear at the top when other forms are displayed。
second:Is there any way to change the depth, width, and color of shadows。
Third:can the form have shadow all around? |
|
|
Back to top |
|
|
Corroder Grandmaster Cheater Supreme Reputation: 75
Joined: 10 Apr 2015 Posts: 1667
|
Posted: Tue Sep 01, 2020 10:51 am Post subject: |
|
|
Answer 1:
CS_DropSHADOW = 0x20000
GCL_STYLE = (-26)
Only show Shadow for form with border style 'bsNone' and only show shadow on right and bottom of the form (Vista style).
Answer 2:
Yes, by using GDI lib logic (some of GDI functions already have in CE)
I did make drop shadow with depth, size and color in C#/VB. I try to port the script to CE Lua, but is not successful yet. Some C# script/function that I don't know how to write in CE Lua.
Answer 3: Yes, look Answer 2
Note:
DropShadow and dwmapi functions will difference for each Windows version. DropShadow on work for Vista to Windows 7. In Windows 8 to 10, drop shadow using set component attributes.
Beside, in Windows 7, to take drop shadow effect, the Windows 7 setting must change to 'Show shadow under menu' (google for this)
_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL |
|
Back to top |
|
|
.lua Expert Cheater Reputation: 1
Joined: 13 Sep 2018 Posts: 189
|
Posted: Wed Sep 02, 2020 12:32 am Post subject: |
|
|
UpdateLayeredwindow + GDI seems to be able to implement shadows as well
|
|
Back to top |
|
|
|
|
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
|
|