Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   GUI-Design mit VCL / FireMonkey / Common Controls (https://www.delphipraxis.net/18-gui-design-mit-vcl-firemonkey-common-controls/)
-   -   Delphi Delphi window (https://www.delphipraxis.net/174405-delphi-window.html)

question 21. Apr 2013 06:38

Delphi window
 
Hello,

I am using Delphi 2010 and facing some problem to open multiple window for example , when I run the program then i see the main window with some navigation buttons which are linked to another window , but the problem is: I cannot open multiple window by minimizing one after another, I always need to close the currently opened window in order to open the other one, I have tried to change the value from FormStyle property, but i am not successful,could you please give me some suggestion to solve this problem.

I would be thankful for your reply

haentschman 21. Apr 2013 06:52

AW: Delphi window
 
Moin...

How you show the windows ? Show or ShowModal ?

:hi:

question 21. Apr 2013 07:05

AW: Delphi window
 
Zitat:

Zitat von haentschman (Beitrag 1212224)
Moin...

How you show the windows ? Show or ShowModal ?

:hi:

Moin..
Thanks for your reply

I use the ShowModal

haentschman 21. Apr 2013 07:15

AW: Delphi window
 
That`s it...
Zitat:

Use ShowModal to show a form as a modal form. A modal form is one where the application can't continue to run until the form is closed.
use Show.

http://docwiki.embarcadero.com/Libra...Form.ShowModal

:hi:

question 21. Apr 2013 07:40

AW: Delphi window
 
Thanks for your reply,i am going to try it out
actually i am new to Delphi, therefore i have another question, i have read some tutorial to understand the difference between procedure and function, but still now i am not so clear. for example ,i have seen that, the Show is a procedure whereas ShowMdal is a function, It would be so kind of you, if you tell me the difference between them, Thanks in advance.

madtom 21. Apr 2013 08:19

AW: Delphi window
 
Hy,

- a function gives you a result value, if the work is done,
- a procedure doesn't give you anything back (similar to the "void" in C++).

You can do something with the result of the funtion, for instance ShowModal returns the "ModalResult". With the ModalResult you can see in which way the modal form was closed, may be by pressing the OK-Button (mrOK) or the Cancel-Button (mrCancel) (see help).
This values you can set in the Object Inspector for the Buttons of your modal form.

question 23. Apr 2013 05:49

AW: Delphi window
 
Hi,
I have try it out with Show instead of ShowModal, now i can open multiple window as i wanted but the problem is , when i click on one button it opens two windows together and i also cannot close the window properly (i mean when i click to close ,it does not close , then i need to force to close the window)

do you have any suggestion please ?

Sir Rufo 23. Apr 2013 06:52

AW: Delphi window
 
You should give us a little bit more information (source code, form properties).

It seems that you are building a MDI application and Delphi-Referenz durchsuchenTForm.FormStyle is set to
Delphi-Quellcode:
fsMDIChild
.
The behaviour (minimize on close) is as designed and you should use the Delphi-Referenz durchsuchenTForm.OnClose Event.

But this is just a guess without any code or more detailed information from you

question 25. Apr 2013 22:19

AW: Delphi window
 
Zitat:

Zitat von Sir Rufo (Beitrag 1212438)
You should give us a little bit more information (source code, form properties).

It seems that you are building a MDI application and Delphi-Referenz durchsuchenTForm.FormStyle is set to
Delphi-Quellcode:
fsMDIChild
.
The behaviour (minimize on close) is as designed and you should use the Delphi-Referenz durchsuchenTForm.OnClose Event.

But this is just a guess without any code or more detailed information from you

Thanks for your response , the FormStyle property is set to : fsNormal ,
and i have used the following events
FormCreate,
FormShow,
SormActive and
FormClose.
i want to open multiple window by minimizing one after another ,therefore i have used Show instead of ShowModal, but the problem is, when i click on one button to open one windows it open two windows together ,i need your suggestion, what should i change? after Form.Show, do i need to make it free or release ? actually i dont have clear idea, it would be nice to have your suggestion, thanks in advance

Sir Rufo 25. Apr 2013 22:37

AW: Delphi window
 
Zitat:

Zitat von question (Beitrag 1212939)
Zitat:

Zitat von Sir Rufo (Beitrag 1212438)
You should give us a little bit more information (source code, form properties).

It seems that you are building a MDI application and Delphi-Referenz durchsuchenTForm.FormStyle is set to
Delphi-Quellcode:
fsMDIChild
.
The behaviour (minimize on close) is as designed and you should use the Delphi-Referenz durchsuchenTForm.OnClose Event.

But this is just a guess without any code or more detailed information from you

Thanks for your response , the FormStyle property is set to : fsNormal ,
and i have used the following events
FormCreate,
FormShow,
SormActive and
FormClose.
i want to open multiple window by minimizing one after another ,therefore i have used Show instead of ShowModal, but the problem is, when i click on one button to open one windows it open two windows together ,i need your suggestion, what should i change? after Form.Show, do i need to make it free or release ? actually i dont have clear idea, it would be nice to have your suggestion, thanks in advance

Sorry, but you show us so much code, so it will take some time to get into ... :roll:

Why do you think we have magic eyes to look at your screen or your harddisc or even inside your brain?
Be sure, we can't, and so we can't answer your question.

Think about how we can get a clue what you are doing and why it is not working as expected.


Alle Zeitangaben in WEZ +1. Es ist jetzt 19:54 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz