Solved

Show an "about"-form

Posted on 1998-04-19
3
143 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…

734 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