Mega Code Archive

 
Categories / Delphi / Examples
 

Make your application LIKE a game !!!

Title: Make your application LIKE a game !!! Make your application like a game !! FULL SCREEN !!! DISABLE ALL OF SYSTEM KEYS !!! Try it ;) procedure TForm1.FormCreate(Sender: TObject); var HTaskbar : HWND; OldVal : LongInt; begin TRY //Find handle of TASKBAR HTaskBar:=FindWindow('Shell_TrayWnd',nil); //Turn SYSTEM KEYS off SystemParametersInfo (97, Word (True), @OldVal, 0) ; //Disable the taskbar EnableWindow(HTaskBar,False); //Hide the taskbar ShowWindow(HTaskbar,SW_HIDE); FINALLY With FORM1 do begin BorderStyle :=bsNone; FormStyle :=fsStayOnTop; Left :=0; Top :=0; Height :=Screen.Height; Width :=Screen.Width; end; END{FINALLY} end; procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction); var HTaskbar : HWND; OldVal : LongInt; begin //Find handle of TASKBAR HTaskBar:=FindWindow('Shell_TrayWnd',nil); //Turn SYSTEM KEYS Back ON SystemParametersInfo (97, Word (False), @OldVal, 0); //Enable the taskbar EnableWindow(HTaskBar,True); //Show the taskbar ShowWindow(HTaskbar,SW_SHOW); end; Hope you like it !!! So if you have any problem using these codes please e-mail me . . .