لو انك تريد
صممت اسطوانة ببرنامج الاوتو بلاى على شكل ملف تنفيذى
exe
واردت تشديد الحماية حول محتواهاو
الا يصل احد لمحتوى الاسطوانة
اثناء تشغيلك لها
جرب هذه الطريقة
1 - ماذا لو يكون مشروعنا يتميز بأنه flat و ننزع الاختيار movable
وفعل الاضافة Memory

2 - نزرع في globbal functions
Code:
function EnableWindow(nHWND, bEnable)
local nEnable=0
if bEnable then nEnable = 1 end
DLL.CallFunction("user32.dll", "EnableWindow", nHWND..","..nEnable, DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL)
end
function MouseClipping()
_RECT = Memory.CreateStructure("long, long, long, long");
Memory.SetStructureData(_RECT, 1, 0, nLeft, "");--left
Memory.SetStructureData(_RECT, 2, 0, nTop, "");--top
Memory.SetStructureData(_RECT, 3, 0, nRight, "");--right
Memory.SetStructureData(_RECT, 4, 0, nBottom, "");--bottom
DLL.CallFunction(_SystemFolder.."\\User32.dll", "ClipCursor", _RECT, DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL)
Memory.FreeStructure(_RECT);
end
function Screen_coordinates()
nLeft = 0;
nTop = 0;
nRight = System.GetDisplayInfo().Width;
nBottom = System.GetDisplayInfo().Height;
end
function Do_clipping()
Input.SetText ("Input_left", nLeft);
Input.SetText ("Input_top", nTop);
Input.SetText ("Input_right", nRight);
Input.SetText ("Input_bottom", nBottom);
Page.StartTimer(250);
Label.SetText ("Label4", "Press Alt+F4 to disable clipping.");
Ex_it = 1;
end
3 - في on show
Code:
nHWND = Application.GetWndHandle(); nLeft = Window.GetPos (nHWND).X; nTop = Window.GetPos (nHWND).Y; nRight = Window.GetSize (nHWND).Width+nLeft; nBottom = Window.GetSize (nHWND).Height+nTop; Do_clipping();
4 - في on timer
Code:
nActiveHWND = String.ToNumber(DLL.CallFunction(_SystemFolder.."\\User32.dll", "GetActiveWindow", "", DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL))
if nActiveHWND == nHWND then
else
EnableWindow(nHWND, true);
end
MouseClipping ]();
شروحات لبعض طرق حماية محتوى التجميعة للاستاذ ثامر أبو بلقيس
