Solved

Show an "about"-form

Posted on 1998-04-19
3
137 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 50 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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
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…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

759 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

19 Experts available now in Live!

Get 1:1 Help Now