Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 254
  • Last Modified:

Replace windows desktop with my form?

How can I replace windows desktop with one form of my application? That is, the form will be always on bottom most position.
0
delphi1
Asked:
delphi1
  • 4
  • 3
1 Solution
 
MadshiCommented:
Hmmm. You could start your own program as shell (replace "system.ini\[boot]\Shell=Explorer.exe" to "system.ini\[boot]\Shell=C:\YourPath\YourPrg.exe"). But then you have neither the taskbar nor any desktop icons. The whole interface is up to you.

If you want to implement your own toolbar (either instead of the Explorer's or in addition to the Explorer's), then please open the win32.hlp file, go to index, jump to "Application Desktop Toolbars". Now you can click on the button [>>] to learn all about this theme.

Regards, Madshi.
0
 
intheCommented:
hi,
or do this :use the form you want to replace desktop with as main form
project -->options -->mainform

set it maximized
turn border options in object inspector all to false
and no caption
and set borderstyle to none
on formcreate event do:
form1.width:=Screen.Width;
Form1.Height:=Screen.Height;

that should be about it to test stick a button on it with a close event
now you can show and hide all other forms and this form will stay on bottom.make sure it is created first in .dpr file
view -->units -->project1.dpr
Regards Barry
 
0
 
delphi1Author Commented:
Madshi
Sorry, that isn't what I expect. And it is pretty complicated to implement my own toolbar. The desktop form of my application would act as a jump center with an IE TWebBrowser ActiveX component to disply dynamic information.
  I have disabled windows task switching and hide taskbar and desktop, So, the end users will not do stupid things, such as drag a folder to other location. Now I need to add a dynamic desktop into the app. Certainly, the system maintainer can restore the windows original appearance, that is one function of my app.

inthe
  I don't think your methord works. I have not said there is no other applications running. Maybe the notepad. if I run it from my application, the focus would switch to notepad, then if i click the full screen background form, focus would switch back to my applicaion and notepad is hided.

Regards Young
0
Technology Partners: 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!

 
MadshiCommented:
Your question was, how to replace the desktop with your own form. To do this, change the system.ini.
Now another question is, what should your form do exactly and what should it look like and last but not least: How are we supposed to help you?
You could look at Screen.Width/Height (just as Barry suggested) and put your form simply on the bottom of the screen. But then you won't be able to display the trayIcons. Is that ok for you? If yes: Look at the message WM_DISPLAYCHANGE. It tells you that the size of the screen (or the color depth) has changed. So if this message is fired you have to resize/move your form.

More questions? Please tell us in detail, with what we can help you...   :-)

Regards, Madshi.
0
 
delphi1Author Commented:
English is not my mother language. Sorry for make you mistake. That is my only question: is it possible to let one of my application forms be always on bottom most position, just act as the windows desktop, without makeing my application the shell? Form can be TopMost, but how can it be BottomMost.
  I said what Barry suggested can not let the form alway be bottom most windows if there is other applications running.

Regards,Young.
 
   
 

0
 
MadshiCommented:
Hi Young,

add this to the form, that you want to stay in the background (I hope that is what you want... :-)))

type
  TForm1 = class(TForm)
  private
    { Private-Deklarationen }
    procedure WindowPosCh(var Message: TWMWINDOWPOSCHANGING); message WM_WINDOWPOSCHANGING;
  public
    { Public-Deklarationen }
  end;

procedure TForm1.WindowPosCh(var Message: TWMWINDOWPOSCHANGING);
begin
  with Message.WindowPos^ do flags:=flags or SWP_NOZORDER;
  Message.result:=0;
end;

Regards, Madshi.
0
 
delphi1Author Commented:
Yes! That is what I want. Now I don't know how to express my thanks, can you help me...:-))
0
 
MadshiCommented:
No problem. I'm always glad if I can help other programmers...  :-)
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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.

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