CODE:#define WS_VISIBLE 0x10000000
#define WS_EX_TOPMOST 0x00000008
#define IDC_SIZEALL 32646
#define IDC_ARROW 32512
#define WM_CLOSE 0x0010
#define WS_POPUP 0x80000000
#define WS_EX_LAYERED 0x00080000
#define LWA_ALPHA 2
#define HTCAPTION 2
external(INT, "RegisterClass", "RegisterClassA", "User32.dll");
external(INT, "UnregisterClass", "UnregisterClassA", "User32.dll");
external(INT, "CreateWindow", "CreateWindowExA", "User32.dll");
external(INT, "LoadCursor", "LoadCursorA", "User32.dll");
external(INT, "SetCursor", "SetCursor", "User32.dll");
external(INT, "GetModuleHandle", "GetModuleHandleA", "Kernel32.dll");
external(INT, "SetLayeredWindowAttributes", "SetLayeredWindowAttributes", "User32.dll");
external(INT, "SetWindowLong", "SetWindowLongA", "User32.dll");
int WinProc=address("WindowProc");
char Class[99];
strcpy(#Class[0], "myclass");
int PWNDCLASS[10];//Структура WNDCLASS
int CLASS=address(#PWNDCLASS[0]);//Указатель на название класса
initialarray(#PWNDCLASS[0], 0);//Обнуляем структуру
PWNDCLASS[1] = WinProc;
PWNDCLASS[6] = LoadCursor(0, IDC_ARROW);
PWNDCLASS[9] = address(#Class[0]); // имя класса окна
int cursor_size_all = LoadCursor(0, IDC_SIZEALL);
if (RegisterClass(CLASS)==0){messagebox("Не удалось зарегистрировать класс"); goto er;}
int Win=CreateWindow(WS_EX_TOPMOST | WS_EX_LAYERED , address(#Class[0]), "", WS_POPUP | WS_VISIBLE, 200, 100, 400, 300, 0, 0, 0, 0);
SetLayeredWindowAttributes(Win, 0, 255, LWA_ALPHA); // уровень прозрачности от 0 до 255
win w = window ("Program Manager", "Progman", -1);
visualwindow(formatiw(Win), 0, 0, 0, 400, 300, 0, 0 , 100, w);
while(getkeystate(90)==0) // пока не нажата клавиша Z
{
textout(0, 0, 0, "Нажать Z чтобы остановить скрипт", 1);
sleep(1);
}
disablevisualwindow(0);
sendmessage(WM_CLOSE, 0, 0, formatiw(Win));
UnregisterClass(address(#Class[0]), 0);
er:;
function getmessage (WM_LBUTTONDOWN)
{
SetCursor(cursor_size_all);
sendmessage(WM_NCLBUTTONDOWN, HTCAPTION, 0, formatiw(Win)); // перетаскивание окна за клиентскую часть
}