|
-
Mar 30th, 2006, 09:54 AM
#1
Thread Starter
Hyperactive Member
[RESOLVED] C# Shell Replacment
I have been searching high and low and cant find any examples of a basic C# shell replacement. Anyone seen one?
-
Mar 30th, 2006, 09:56 AM
#2
Re: C# Shell Replacment
Shell, as in the Shell Command?
-
Mar 30th, 2006, 09:59 AM
#3
Thread Starter
Hyperactive Member
Re: C# Shell Replacment
Sorry I wasnt more clear. An explorer replacement, not a cmd replacment.
-
Mar 30th, 2006, 12:49 PM
#4
Re: C# Shell Replacment
Just kill the explorer process and replace it with your executable. It doesn't have to browse files either.
-
Mar 30th, 2006, 01:09 PM
#5
Thread Starter
Hyperactive Member
Re: C# Shell Replacment
 Originally Posted by kasracer
Just kill the explorer process and replace it with your executable. It doesn't have to browse files either.
I know... but I want an example of one that actually talks with win32k.sys. For example, when I make a taskbar in my program, I dont want apps to maximize over top of it(assuming mine is bigger then explorers). And I want to see how another makes their system tray that will interact other applications.
And as a side note, killing explorer is not the best way to go about it, acutally closing benfits you much more as it clears all the stuff win32k is caching and allows you to take more control.
-
Mar 30th, 2006, 01:26 PM
#6
Re: C# Shell Replacment
 Originally Posted by BrandonTurner
I know... but I want an example of one that actually talks with win32k.sys. For example, when I make a taskbar in my program, I dont want apps to maximize over top of it(assuming mine is bigger then explorers). And I want to see how another makes their system tray that will interact other applications.
Well, you can make your own Taskbar and just had it show the running programs. Then use the Win32 API to get all the open windows and make sure they're not over your task bar (and resize them if they are).
 Originally Posted by BrandonTurner
And as a side note, killing explorer is not the best way to go about it, acutally closing benfits you much more as it clears all the stuff win32k is caching and allows you to take more control.
You can't just "close" explorer. The only way to make it stop running is to end its process or change the path of the shell in the registry and restart the system.
-
Mar 30th, 2006, 03:35 PM
#7
Thread Starter
Hyperactive Member
Re: C# Shell Replacment
 Originally Posted by kasracer
Well, you can make your own Taskbar and just had it show the running programs. Then use the Win32 API to get all the open windows and make sure they're not over your task bar (and resize them if they are).
Lol, that would horrible to keep checking for that. There is a way using win32 api to tell win32k.sys what size your tool bar is so that it knows how big to make the windows when they are max. That is one of the many reasons I want to see a basic example so i can get a feel for these API.
 Originally Posted by kasracer
You can't just "close" explorer. The only way to make it stop running is to end its process or change the path of the shell in the registry and restart the system.
Now, you should check your facts first. click start -> shutdown, then hold down shift, ctrl, and alt and hit cancel. and there you go, explorer closed down itself and cleared any settings it had told win32k, along with many other things that dont happen when you just kill it.
-
Mar 30th, 2006, 04:19 PM
#8
Re: C# Shell Replacment
 Originally Posted by BrandonTurner
Lol, that would horrible to keep checking for that. There is a way using win32 api to tell win32k.sys what size your tool bar is so that it knows how big to make the windows when they are max. That is one of the many reasons I want to see a basic example so i can get a feel for these API.
Well I wasn't even aware win32k.sys had GUI level methods (it operates in kernel space). I found this site which seems to have a list of its calls. Odd they would put GUI code in kernel space... heh
 Originally Posted by BrandonTurner
Now, you should check your facts first. click start -> shutdown, then hold down shift, ctrl, and alt and hit cancel. and there you go, explorer closed down itself and cleared any settings it had told win32k, along with many other things that dont happen when you just kill it.
This feature was added in Windows 95 and was only provided as an easy way to close Explorer. It was mainly used for testing plugins.
It's not going to matter if you kill it or use this method. They do almost the samething.
Also, as far as I can tell, win32k.sys provides an interface for making system calls and it does not hold any settings for explorer or any other app.
-
Mar 30th, 2006, 04:23 PM
#9
Thread Starter
Hyperactive Member
Re: C# Shell Replacment
 Originally Posted by kasracer
Well I wasn't even aware win32k.sys had GUI level methods (it operates in kernel space). I found this site which seems to have a list of its calls. Odd they would put GUI code in kernel space... heh
yes, awkard, but i think they do it out of speed.
 Originally Posted by kasracer
This feature was added in Windows 95 and was only provided as an easy way to close Explorer. It was mainly used for testing plugins.
It's not going to matter if you kill it or use this method. They do almost the samething.
Also, as far as I can tell, win32k.sys provides an interface for making system calls and it does not hold any settings for explorer or any other app.
They are different. For example, kill explorer and open notpad and maxmize it. it will not fill the whole screen, it leaves room for the old taskbar. now "close" it using my method and it when you maxmize it, notepad will fill the whole screen.
-
Mar 30th, 2006, 04:49 PM
#10
Re: C# Shell Replacment
 Originally Posted by BrandonTurner
They are different. For example, kill explorer and open notpad and maxmize it. it will not fill the whole screen, it leaves room for the old taskbar. now "close" it using my method and it when you maxmize it, notepad will fill the whole screen.
Both the CONTROL + SHIFT + ALT at the shutdown screen and ending the Explorer process on both of my PCs yield the same result. Windows still behave correctly in relation to their size.
One thing that doesn't work correctly no matter which method used is clicking on something in the taskbar to minimize or maximize it if it was open while explorer was shutdown.
From my measurements, it seems to take the same amount of time to end the explorer process and to close it via your method so it doesn't appear as if it's making any calls when it's closing "the right way" unless it has just a few quick calls (normally, when clearing the cache from any application, there is significant disk activity but it appears to be the same no matter which way Explorer is closed).
Anyway, we are going off topic. Maybe someone else will post that has more experience with using the win32k.sys (I don't even know how to use it; I don't think you can directly reference it).
-
Apr 17th, 2006, 09:30 AM
#11
Thread Starter
Hyperactive Member
Re: C# Shell Replacment
In general the API i was looking for SystemParametersInfo(), and I found an exmaple of it being used here: http://www.csharphelp.com/archives3/archive578.html
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|