Solved

Hiding Program Manager et al

Posted on 1999-01-01
15
247 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
  • 6
  • 3
  • 3
  • +1
15 Comments
 
LVL 20

Expert Comment

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

Regards, Madshi.
0
 
LVL 17

Expert Comment

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

Expert Comment

by:Madshi
Comment Utility
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
 
LVL 17

Expert Comment

by:inthe
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
no problem.....:))

¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
¤¤ MORE AND MORE STARS :)) ¤¤¤
¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Author Comment

by:ChrisBerry
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

744 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now