Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Show an "about"-form

Posted on 1998-04-19
3
Medium Priority
?
149 Views
Last Modified: 2010-04-06
Hello,

I have made a simple application. Now I want to show an "About..."-form. I did this with

AboutFrm.Visible:=true;

This works, but when I press the Close-button on this About-form, the Main-form will start over from the beginning.
How can I show a second form without starting over the main form again when I close this second form?

Thanx !!

Stefan van Roosmalen.
0
Comment
Question by:roosiedb
3 Comments
 
LVL 3

Expert Comment

by:KE
ID: 1335166
What do you mean by starting the main form over ?

You could try to use this one, which is normal for about boxes:
AboutBox.ShowModal;
It requires an "OK" button with a value in the ModalResult property.
0
 

Author Comment

by:roosiedb
ID: 1335167
Well, I want to use (let's say) 5 different forms in ONE application. When I want to show (and activate) the About-form, or the Search-form, or the Configuration-form, or ....
How can I do that without having the problem my Mainform-onActivate-event will start over again when I close the other forms.
0
 
LVL 1

Accepted Solution

by:
AndersWP earned 200 total points
ID: 1335168
Basically you can not, unless you want to be tricky, which I do not think is necessary.

The OnActivate event is intended to be used for just this. It signals that the focus has returned to the form.

It sounds to me like you have some initialization code hooked to the OnActivate event, and you get problems when the event fires again when the About-form closes. The simple solution to this is not to use the OnActivate event to execute initialization code. Instead, use OnShow or OnFormCreate. OnShow is fired each time the form is made visible, while OnFormCreate is fired exactly once during the lifetime of the form. Depending on the initialization you do, either event could be appropriate.

I hope this will help.

Greetings,
AndersWP
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

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

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…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

824 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