0

I'm Currently Developing a Windows Server Core Shell/Windows Shell Replacement that's CPU and RAM Efficient.

But it keeps getting in the way if I click on the Desktop.

Is there any way of letting it stay on the desktop/behind all other windows?

It Shouldn't take too much CPU and Ram.

Chris Catignani
  • 5,040
  • 16
  • 42
  • 49
  • 1
    [What if two programs did this?](https://devblogs.microsoft.com/oldnewthing/20050607-00/?p=35413) – GSerg Jul 10 '21 at 14:50
  • Really? You can write a full-featured windows shell replacement in C# that's more CPU and RAM efficient than the Microsoft implementation? If it is really a shell, you can let start your application instead of explorer.exe and gain full control: https://learn.microsoft.com/en-us/previous-versions/windows/embedded/ms838576(v=winembedded.5) – Oliver Jul 28 '21 at 09:22
  • @Oliver Yes i can (Currently only 16 MB RAM). i will release it on GitHub when finished. – Games_Crack Aug 29 '21 at 11:56

1 Answers1

0

Cant comment yet, so here is something ive found: Setting a Windows form to be bottommost
so you only have to add this to your class / Form

[System.Runtime.InteropServices;DllImport("user32.dll")]
static extern bool SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, int X, int Y, int cx, int cy, uint uFlags);

static readonly IntPtr HWND_BOTTOM = new IntPtr(1);
const UInt32 SWP_NOSIZE = 0x0001;
const UInt32 SWP_NOMOVE = 0x0002;
const UInt32 SWP_NOACTIVATE = 0x0010;

and then on the Form.Activate and the Form.Load event you have to run the declared method like this:

SetWindowPos(Handle, HWND_BOTTOM, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);

Code from Richard Ev

doEggi
  • 1