Solved

Replace windows desktop with my form?

Posted on 1999-01-08
8
243 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

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…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

895 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

15 Experts available now in Live!

Get 1:1 Help Now