Hi
Thanks to Felipe Monteiro de Carvalho (FPC mailing list) and
Lyh1 (Lazarus Forum) I found the easy, working way to
run a Full Screen App (hiding taskbar and SIP button).
I tested it so far on WM 6.1 emulator.
I have this function:
{$include c:\lazarus\fpc\2.2.4\source\rtl\wince\wininc\coredll.inc}
function FindWindow(lpClassName:widestring; lpWindowName:widestring): thandle; stdcall; external 'coredll.dll' name 'FindWindowW';
function ShowWindow(hWnd:thandle; nCmdShow:integer):Boolean; stdcall;external 'coredll.dll' name 'ShowWindow';
procedure resetpda(showit: Boolean);
const
SW_HIDE = $0000;
SW_SHOW = $0001;
Var
hTaskBar,hkeyboard: thandle;
SW: INTEGER;
begin
if showit then begin
sw:=SW_SHOW
end ELSE begin
SW:=SW_HIDE;
end;
hTaskBar := FindWindow('HHTaskBar','');
if htaskBar > 0 then
ShowWindow(hTaskBar,SW);
hkeyboard:=FindWindow('menu_worker','');
if hkeyboard >0 then
ShowWindow(hkeyboard,SW);
end;
In My MainForm.Create i call
resetpda(false);
In the Finalization section of the Main Form
resetpda(true);
In AppException I also have
resetpda(true);
The taskbar and the menu bar (with the SIP button) are invisible
for the life of the APP, and are restored when the App is terminated.
P.S.Lyh1: how did youfind out it was 'menu_worker' not 'MS_SIPBUTTON' when hundreds of posts EVEN in the MS forums give totally incorrect information (which makes us WASTE dozens of hours) insisting in that MS_SIPBUTTON?
Just curiosity