• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 292
  • Last Modified:

Hiding Program Manager et al

Hi,

Minor problem using Win95 and NT and programming in Delphi 3. In my program, I wish to hide the Program Manager and the Taskbar while I have a program running, so as to stop the operator invoking another program, then restore them afterwards.

I have no problem hiding and restoring either the Program Manager or the Taskbar but I have noticed that when both are hidden then by double clicking on the blank screen I can get the Start Menu to appear.

My question is how do I stop this happening?

Cheers

Chris
0
ChrisBerry
Asked:
ChrisBerry
  • 6
  • 3
  • 3
  • +1
1 Solution
 
MadshiCommented:
How about stopping the explorer (by sending a WM_QUIT to the "Program Manager" window)?

Regards, Madshi.
0
 
intheCommented:
would making the form modal stop clicking on desktop
Regards Barry
0
 
MadshiCommented:
Hi Barry, would not work, since showModal only disables windows of your own process, not the desktop window.
But your idea brings me to another idea:

Chris, try this one:

  c1:=FindWindowEx(FindWindowEx(FindWindow('Progman','Program Manager'),0,'SHELLDLL_DefView',''),0,'SysListView32','');
  EnableWindow(c1,false);
  MessageBox(0,'Desktop is enabled now...','Info',0);
  EnableWindow(c1,true);

Regards, Madshi.
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
intheCommented:
oh yeh Doh
i been trying a way with getclientrect and not letting mouse leave it but wont bloody work either .if there's to be no double clicking on the desktop maybe make a form to sit in background (Just a thought :-)
Barry
0
 
viktornetCommented:
if you don;t won't the mouse to move out of a rectange you do something like this...

var
  r : TRect;
begin
  r := rect(0, 0, 100, 100);
  ClipRect(@r);
  //Now you can only move your mouse withing that region  (the rectangle)... If you want to go  //back and return the control over the mouse you should do this...
  ClipRect(nil);
end;

I hoe this helps Barry :)

¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
¤¤¤¤¤ STARS  ¤¤¤¤¤
¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
0
 
intheCommented:
cool i never used this rect thing only read a bit about it so thanks for sample :-)
Regards Barry




0
 
viktornetCommented:
no problem.....:))

¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
¤¤ MORE AND MORE STARS :)) ¤¤¤
¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
0
 
ChrisBerryAuthor Commented:
Hi all,

Sorry for the delay, EE had my old e-mail address and I thought no one was responding.

Madshi, I have tried your idea but SyslistView32 is not available to disable before it exists. I can of course disable Progman, but only when it is visible, but my requirement is for it not to be visible.

This is what I have found so far unless I am doing it wrong!.

victornet and Barry,

I cannot use rect clipping or modal as I wish to go between a couple of windows.

Cheers

Chris

0
 
MadshiCommented:
Chris,

you said you've hidden both program manager and explorer. So if you've HIDDEN them, they should be still there, right? Why then is there no "SyslistView32"?
And how did you hide these programs? How about stopping them instead of hiding them (see my first comment)?
Hmmm. If I double click on my desktop, nothing happens at all. Ok, I've win98 now...  I remember something like win95 would start "c:\windows\taskman.exe" if you double click on the desktop. Or am I wrong?

Regards, Madshi.
0
 
ChrisBerryAuthor Commented:
Madshi,

Thanks for your reply,

I used the following to hide the windows

  StrPCopy(@wndClass[0], Window);
  wndHandle := FindWindow(@wndClass[0], nil);
  ShowWindow(wndHandle, SW_HIDE);       // This hides the window

Where Window is the class of the window I am hiding eg Progman or the systray.

I tried to fit your solution around this and only managed to get Progman disabled, which could be a solution to my problem but leaves all the icons on the desktop.

The only thing I can think of is there is another window present, I have a program that will tell me all the windows current (and potential), that I should be able to hide. Basically if I hide the systray then double click on the "wallpaper" the Start Menu come up, regardless of whether Progman is running.

Stopping them causes a task manager dialog box to appear when double clicked, also not desirable.

Hope this helps. BTW I am only trying this on Win95 at the moment.

Regards

Chris

0
 
MadshiCommented:
You could stop the explorer (so that a double click on the desktop would bring up the task manager dialog box) and rename (or even delete) the file "c:\windows\taskman.exe" (which IS the task manager dialog box).

Regards, Madshi.
0
 
viktornetCommented:
Chris, I was just trying to tell Barry how to clip a rectangle.. I know that it wouldn't help you to use rectangle clipping...
0
 
ChrisBerryAuthor Commented:
Madshi,

Please lock this so I can give you the points. I am unable to do what I have wanted so I have negotiated that I can disable the Progman window.

Regards

Chris

0
 
MadshiCommented:
Hi Chris,

thank you for the points...

Are you really giving up? I'm sure there IS a solution...

You wrote: "Stopping them causes a task manager dialog box to appear when double clicked, also not desirable."
And I wrote: "rename (or even delete) the file "c:\windows\taskman.exe" (which IS the task manager dialog box)."

Have you tried that? I mean, you can simply delete the taskman.exe. Who needs it?

Regards, Madshi.

0
 
MadshiCommented:
Hmm. There are more possibilites. You could write a system wide hook, that is called before a window is created. Then in this hook you can look at the window to check if you like it. If not, you can tell Windows to destroy it (even before it is opened). If you like this - tell me - I've some sources for that. But - you'll need a little DLL for that...

Regards, Madshi.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 6
  • 3
  • 3
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now