var
pHWND : HWND;
Model : DEVMODE;
Style,ExStyle:longint;
begin
pHWND := FindWindow(ClassName,WindowName);
if EnumDisplaySettings(0,0,Model) then
begin
Model.dmPelsWidth := 1024;
Model.dmPelsHeight := 768;
ChangeDisplaySettings(Model,0);
end;
Style := GetWindowLong(pHWND,GWL_STYLE);
Style := WS_OVERLAPPEDWINDOW or WS_VISIBLE';
SetWindowLong(pHWND,GWL_STYLE,Style);
ExStyle := GetWindowLong(pHWND,GWL_EXSTYLE);
Exstyle := WS_EX_APPWINDOW or WS_EX_WINDOWEDGE;;
SetWindowLong(pHWND,GWL_EXSTYLE,ExStyle);
SetWindowPos(pHWND,HWND_NOTOPMOST,0,0,800,600,SWP_SHOWWINDOW);
ShowWindow(pHWND,SW_SHOWNORMAL);
end;