Solved

Replace windows desktop with my form?

Posted on 1999-01-08
8
238 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
  • 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
 
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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
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…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

758 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

13 Experts available now in Live!

Get 1:1 Help Now