Solved

Hiding Program Manager et al

Posted on 1999-01-01
15
267 Views
Last Modified: 2010-04-04
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
Comment
Question by:ChrisBerry
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 3
  • 3
  • +1
15 Comments
 
LVL 20

Expert Comment

by:Madshi
ID: 1354106
How about stopping the explorer (by sending a WM_QUIT to the "Program Manager" window)?

Regards, Madshi.
0
 
LVL 17

Expert Comment

by:inthe
ID: 1354107
would making the form modal stop clicking on desktop
Regards Barry
0
 
LVL 20

Expert Comment

by:Madshi
ID: 1354108
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 17

Expert Comment

by:inthe
ID: 1354109
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
 
LVL 10

Expert Comment

by:viktornet
ID: 1354110
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
 
LVL 17

Expert Comment

by:inthe
ID: 1354111
cool i never used this rect thing only read a bit about it so thanks for sample :-)
Regards Barry




0
 
LVL 10

Expert Comment

by:viktornet
ID: 1354112
no problem.....:))

¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
¤¤ MORE AND MORE STARS :)) ¤¤¤
¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
0
 

Author Comment

by:ChrisBerry
ID: 1354113
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
 
LVL 20

Expert Comment

by:Madshi
ID: 1354114
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
 

Author Comment

by:ChrisBerry
ID: 1354115
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
 
LVL 20

Expert Comment

by:Madshi
ID: 1354116
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
 
LVL 10

Expert Comment

by:viktornet
ID: 1354117
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
 

Author Comment

by:ChrisBerry
ID: 1354118
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
 
LVL 20

Accepted Solution

by:
Madshi earned 50 total points
ID: 1354119
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
 
LVL 20

Expert Comment

by:Madshi
ID: 1354120
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

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Strange behavior when a form is closed 6 68
Delphi 2 77
Reconfigure Delphi Install? 2 65
Way to create an iPhone app for my customers 8 42
A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question