
hi Telco
here your example

MEGA.NZ
sendai escribió: ↑28 Ene 2021 03:31Hello everyone.. is there any ways how make any AMS aps change the window style from flat to window vice versa? i am talking about a script to do it not in the AMS Project settings which there is a option to make it flat or window mode..
See this example of mine friend if it serves you![]()
Exampe
Image
glad I wasn't helpful
science fiction ... this makes us understand the weight of your preparation on the subject
function WindowShadow(tHandle)
function BitOr(nX, nY)
local function ValidDec(nDec)
local lValid = true;
if (nDec) then
for n = 1, String.Length(nDec) do
if (String.Mid(nDec, n, 1) < "0" or String.Mid(nDec, n, 1) > "9") then
lValid = false;
break;
end
end
else
lValid = false;
end
return lValid
end
local function ValidBin(cBin)
local lValid = true;
if (cBin) then
for n = 1, String.Length(cBin) do
if (String.Mid(cBin, n, 1) < "0" or String.Mid(cBin, n, 1) > "1") then
lValid = false;
break;
end
end
else
lValid = false;
end
return lValid
end
local function DecToBin(nDec)
cBin = "";
if (ValidDec(nDec)) then
if (type(nDec) == "string") then nDec = String.ToNumber(nDec) end
while nDec ~= 0 do
cBin = Math.Mod(nDec, 2)..cBin;
nDec = Math.Floor(nDec / 2);
end
end
return cBin
end
local function BinToDec(cBin)
nDec = 0;
local lValid = true;
if (ValidBin(cBin)) then
for n = 1, String.Length(cBin) do
nDec = nDec + String.ToNumber(String.Mid(cBin, n, 1)) * 2^(String.Length(cBin)-n);
end
end
return nDec
end
nResult = 0;
local cBin = "";
if (ValidDec(nX) and ValidDec(nX)) then
if (type(nX) == "string") then nX = String.ToNumber(nX) end
if (type(nY) == "string") then nY = String.ToNumber(nY) end
local cBinX = DecToBin(nX);
local cBinY = DecToBin(nY);
if (String.Length(cBinX) > String.Length(cBinY)) then
cBinY = String.Repeat("0", String.Length(cBinX) - String.Length(cBinY))..cBinY;
elseif (String.Length(cBinY) > String.Length(cBinX)) then
cBinX = String.Repeat("0", String.Length(cBinY) - String.Length(cBinX))..cBinX;
end
for n = 1, String.Length(cBinX) do
if (String.Mid(cBinX, n, 1) == String.Mid(cBinY, n, 1) and String.Mid(cBinX, n, 1) == "0") then
cBin = cBin.."0";
else
cBin = cBin.."1";
end
end
nResult = BinToDec(cBin);
end
return nResult
end
GCL_STYLE = -26;
CS_DROPSHADOW = 131072;
SPI_SETDROPSHADOW = 4133;
res = DLL.CallFunction("user32.dll", "SystemParametersInfoA", SPI_SETDROPSHADOW..",0,1,0", DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL);
CurrentStyle = DLL.CallFunction("user32.dll", "GetClassLongA", tHandle..","..GCL_STYLE, DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL);
res = DLL.CallFunction("user32.dll", "SetClassLongA", tHandle..","..GCL_STYLE..","..BitOr(CurrentStyle, CS_DROPSHADOW), DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL);
end
WindowShadow(Application.GetWndHandle())