remove taskbar?

hello
i develop programs for children with special needs.
most of them are kind of games with skill levels that are easy to adapt to the needs of the child.
for the games i normally have a specific screen resolution in mind.
so i switch the resolution
my problem is, if the resolution i want to switch to is the current
system resolution, the taskbar is always visible and accessible during
gameplay.
for many childs it is important that they can see only the gamescreen
and nothing else.
so how do i temporarily disable the taskbar (regardless of its state)?
after the game's closed the original state should be restored.

thanks for your help
LVL 3
gandalf_the_whiteAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

florisbCommented:
This should be part of the answer, two buttons on form, one to enable, one to disable.

Remaining problem; If you have a keyboard with a windows key, you can still use it....

Good Luck!
Floris.

unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls;

type
  TForm1 = class(TForm)
    Button1: TButton;
    Button2: TButton;
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;
  w: hwnd;


implementation

{$R *.DFM}

procedure TForm1.Button1Click(Sender: TObject);
begin
w:=findwindow('shell_traywnd',nil);
w:=getnextwindow(w,gw_child);
showwindow(w,sw_hide);
w:=findwindow('shell_traywnd',nil);
showwindow(w,sw_hide);
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
w:=findwindow('shell_traywnd',nil);
w:=getnextwindow(w,gw_child);
showwindow(w,sw_show);
w:=findwindow('shell_traywnd',nil);
showwindow(w,sw_show);
end;

end.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
nricoCommented:
Yup, the
ShowWindow(FindWindow('Shell_TrayWnd',Nil),SW_HIDE);
works. You can prevent the popup of the Start Menu by pressing the Win95 key by

systemparametersinfo(97,word(true),@keys,0);

This disables *ALL* system keys by making Windows think a screensaver is running, so the kids can't disturb the game by pressing the Win95 key, Alt-Space or anything.
0
florisbCommented:
Extra:

if your application only uses a mouse, you could enable and disable the keyboard:

if tmp='nokeyboard' then
    begin
      asm
        in al,21h
        or al,2;
        out 21h,al;
      end;
    end;
 if tmp='keyboard' then
    begin
      asm
        in al,21h
        and al,7;
        out 21h,al;
       end;
      tmp:='';
    end;

I get an error priviledged instruction on these calls, but I'm sure someone here could help you further with this.

F-)




 
0
Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

MadshiCommented:
Another possibility would be to make your form topmost (set FormStyle to fsStayOnTop).

The screensaver trick works only under win9x.

Regards, Madshi.
0
florisbCommented:
My keyboard trick is also only win9x I believe.
0
craig_capelCommented:
Floris, your keyboard trick should work with NT, but i did notice a tiny bug with that  but not a problem....

it should work on any system....

there is one other thing.... and thats to Terminate the explorer running..... like so, and when you have finsihed, simply run explorer again..... only disadvantage is that all your icons dissapear due to thats also part of explorer....
0
MadshiCommented:
I'm not sure whether this assembler trick works under win32 at all, since Windows (at least winNT) intercepts all "in" and "out" calls (with the help of the CPU) and filters them. If your code does something you're not allowed to, you'll get an error box or even a blue screen...
0
gandalf_the_whiteAuthor Commented:
to nrico
normally the kids don't use a standard keyboard, so the windows keys are not the problem

thanks florisb
the code works perfect, here are your points

0
craig_capelCommented:
floris, could you do me a big favour? see if you can break out of my program, thats if you have not already seen it?

http://members.xoom.com/craig_c/protect.zip

it uses all the methods i could think of at the time, if you can get out, i have other new tricks i can use, and you can have the source code to that program, if you like it... or want it..
0
florisbCommented:
No problem... ...I have some time left... ...give me an hour or something.

C.U.
Floris.
0
florisbCommented:
Hmmm, I've been running it under Windows NT now. When I lock I get an error: invalid filename.

When locked I don;t have access to the taskmanager, so I can't close it (I'll need a special tool to close it then... ...those tools do exist). How do you do this? I would like to know. Not locked I could just stop it with the taskmanager offcourse.

It also looked that it closed my explorer windows (Madshi said something about this...). I'll read the textfile now first and look again, ah, I shouldn;t run it under win NT... ...too petty. No virusses in it hmmmm....;-)

Floris.

0
topakCommented:
the source for hiding the taskbar works but in my case.. my form reaches up to the point where the taskbar was and I can still see the wallpaper.. why is that? how can I extend my form and occupy the whole screen.. i have tried tinkering with the form properties and change the alignment.. but still ended up with the same result.
0
gandalf_the_whiteAuthor Commented:
with align alclient the form extends only to screen-taskbar.height
if you have your tsakbar not on autoheight
you only have to set the height of the form to screen.height
in the form.show
0
craig_capelCommented:
gandalf, the code floris gave you was only part of my program, if you want to see the whole program (i wrote) is here, and u can see where it was ripped from...

http://tenerife1.com/cjc/protect.zip  << you simply enter a password then enter it again and it does the same thing as alt ctrl and del but for windows 95 / 98 systems.... please do take a look at it....

Craig C.
0
craig_capelCommented:
oops sorry, when i say alt ctrl and del, i mean the locking system, admin type password to get back in, and the code hides the background without making the form a stupid size...... easier to see the source code provided....
0
craig_capelCommented:
floris, YOUR keyboard trick, that was ripped from my code as well!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

that was taken from my avp program...... I don't mind people taking code from me, BUT, at least give me credit, thats all i ask.
0
florisbCommented:
CRAIG CAPEL:

copy-pasted this code from other question in E.E. If you originaly made it; take the credits&pride. Well, the pride then....;-).

I will give credit if something is clearly yours. Your comments in an other thread have affected my thrust in you, far as I know you copy-pasted it yourself from someone else; I really don't know, I won't give you the benifit of doubt, because I really don't care this time...

ps1. Nowhere in this thread I state that the posted code is mine but I don't think anybody except you is really interested in this anymore.

ps2. starting some kind of flame-communication here is much too easy and hopefully also not wanted for you.

ps3. Perhaps you don't care, but sorry for possibly copy-ing your code without naming you! Never has been my intention.

Floris.

0
craig_capelCommented:
all my point ever was is this: that code i see before my eyes right now was all completey lifted from my PROGRAM you even said..




"   I get an error priviledged instruction on these calls, but I'm sure someone here could help you  further with this. "

so you did not actually know what it did, just took it straight from me... I figured all that code out before i even did windows coding, I used my asm for a while, and played around with ports, i tried it in win95 / 98 it worked.. that other code u lifted from me without credit too was me, i used winsight and played around until i got it to work..... at least if i give out code that someone else did, i always point out who did it....

thats it, u don't think thats right i will ingore all your threads from now on....
0
craig_capelCommented:
From: gandalf_the_white
                                                Date: Monday, December 20 1999 - 08:24AM AST

      to nrico      normally the kids don't use a standard keyboard, so the windows keys are not the problem    thanks florisb      the code works perfect, here are your points ....

Thats fine with me, PS i stole the code from some one else and never mentioned them... thats what got me a little annoyed.
0
florisbCommented:
>otherwise big mistakes are made...
please do enlighten me! Something in mind?
 
>after all those sarcastic comments i made at the time
Your so called sarcasm did miss my attention.

>thats it, u don't think thats right i >will ingore all your threads from now >on....
yeah yeah, please do what you feel comfortable with. E.E. was never meant to frustrate people; get over it.

> i suggest dropping it ok?????
Okee.

I never downloaded your protect.zip until today. I remeber now; I got the code from some project called fun.zip or something, THIS WAS NOT YOUR PROJECT!!!!

Craig; credits are not everything and you seem to try to get credit for code that looks like your code. A bit sick in my opinion. Please do ignore me.

Floris.

0
craig_capelCommented:
nah you are right, you got that second bit of code from Fun.pas (My AVP program) and that was very old code, i'm not in the slightest bit bothered about that... but you accept now on both occasions you were wrong, thats suits me.

0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.