Solved

Replace windows desktop with my form?

Posted on 1999-01-08
8
246 Views
Last Modified: 2010-04-06
How can I replace windows desktop with one form of my application? That is, the form will be always on bottom most position.
0
Comment
Question by:delphi1
[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
  • 4
  • 3
8 Comments
 
LVL 20

Expert Comment

by:Madshi
ID: 1355477
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
 
LVL 17

Expert Comment

by:inthe
ID: 1355478
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
 

Author Comment

by:delphi1
ID: 1355479
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
Independent Software Vendors: 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 20

Expert Comment

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

Author Comment

by:delphi1
ID: 1355481
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
 
LVL 20

Accepted Solution

by:
Madshi earned 60 total points
ID: 1355482
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
 

Author Comment

by:delphi1
ID: 1355483
Yes! That is what I want. Now I don't know how to express my thanks, can you help me...:-))
0
 
LVL 20

Expert Comment

by:Madshi
ID: 1355484
No problem. I'm always glad if I can help other programmers...  :-)
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

730 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