AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Mehrfach erstellte Form ansprechen

Ein Thema von Yheeky · begonnen am 18. Feb 2003 · letzter Beitrag vom 18. Feb 2003
Antwort Antwort
Yheeky

Registriert seit: 7. Jun 2002
1.339 Beiträge
 
#1

Mehrfach erstellte Form ansprechen

  Alt 18. Feb 2003, 22:08
Hi,

mit folgenden Zeilen erstelle ich eine Form mehrere Male bzw. lasse Sie mehrere Male öffnen:

Code:
public
   MailFormLesen : TForm;
   NummerMailLesenForms : Integer;
.
.
.
   Application.CreateForm(TFormEMailLesen, Form1.MailFormLesen);
   Form1.MailFormLesen.Name := 'FormMailLesen' + IntToStr(Form1.NummerMailLesenForms);
   Form1.MailFormLesen.FormStyle := fsNormal;
   Form1.MailFormLesen.WindowState := wsNormal;
   Form1.MailFormLesen.Show;
   Inc(Form1.NummerMailLesenForms);
Wie kann ich jetzt in der jeweils erstellten Form auf eine Komponente zugreifen, die sich in der Form befindet?

Gruß Yheeky
  Mit Zitat antworten Zitat
Benutzerbild von nailor
nailor

Registriert seit: 12. Dez 2002
Ort: Karlsruhe
1.989 Beiträge
 
#2

Re: Mehrfach erstellte Form ansprechen

  Alt 18. Feb 2003, 22:34
Zitat von Yheeky:
Code:
Application.CreateForm(TFormEMailLesen,Form1.MailFormLesen);
Form1.MailFormLesen gibt an, wie die Form heist

Zitat von Delphi Help:
Creates a new form.

procedure CreateForm(FormClass: TFormClass; var Reference);

Description

Call CreateForm to dynamically create a form at runtime. Developers do not need to add code for creating most forms, because typically one or more calls to CreateForm are added automatically to the Delphi project's main statement part when using the form designer.

CreateForm creates a new form of the type specified by the FormClass parameter and assigns it to the variable given by the Reference parameter. The owner of the new form is the Application object.

Note: By default the form created by the first call to CreateForm in a project becomes the application’s main form.
Michael N.
http://nailor.devzero.de/code/sharpmath/testing/ --- Tests, Feedback, Anregungen, ... aller Art sehr willkommen!
::: don't try so hard - it'll happen for a reason :::
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 11:53 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