Solved

How can I show many windows in one background?

Posted on 1998-06-04
4
128 Views
Last Modified: 2010-04-06
Hi:
  I come form China.I get something trouble in Delphi 1 :-!
In my application,the main window is no title and show a bitmap in it,some other small bitmap on it to get mouse message to show some windows. The trouble is: if I use showmodal,it will be only one windows on background.if show,when mouse click the background,the showed windows will be under the backgroud.
How can I show many window in the backgroud?
0
Comment
Question by:jianl
  • 2
4 Comments
 
LVL 1

Expert Comment

by:Marcius
ID: 1350158
I am not sure exactly what you are trying to do here, but try to set the FormStyle property of the new windows to fsStayOnTop. This should prevent them from disappearing when you click on the background (parent form).

0
 
LVL 4

Expert Comment

by:d003303
ID: 1350159
Marcius:
   Thanks! but I want show more then one windows.
d003303:
   I've try to use MDI forms, but in MDI Main form
the bitmap will be not visibled.

0
 

Author Comment

by:jianl
ID: 1350160
If you want to use multiple form of the same type, but don't want to use MDI, you will have to create the forms at runtime.

Remove the child form from the Project|Options|Autocreate forms list. Then, each time you want a new form to appear:

procedure MyApp.OnBitmapClick;
begin
  with MyForm1.Create(self) do begin

    //Set your parameters here
    FormStyle := fsStayonTop;
    Show;

  end;
end;

Each time you click on your bitmap, you will dynamically create a new form. This should allow you to have multiple forms without using the MDI. However, you need to make sure that you destroy all the forms when you exit your application. Otherwise you will waste memory.
0
 
LVL 1

Accepted Solution

by:
Marcius earned 100 total points
ID: 1350161
Thanks you a lot!
Every window must be fsStayOntop.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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.

Question has a verified solution.

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

Suggested Solutions

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

856 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