AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Programmieren allgemein How to create Eg. Ten instaces of the same form?
Thema durchsuchen
Ansicht
Themen-Optionen

How to create Eg. Ten instaces of the same form?

Ein Thema von pastra · begonnen am 14. Jul 2006 · letzter Beitrag vom 15. Jul 2006
Antwort Antwort
Dax
(Gast)

n/a Beiträge
 
#1

Re: How to create Eg. Ten instaces of the same form?

  Alt 14. Jul 2006, 17:45
Well, first: do not use the global var Form1 in the Form's Unit anymore. Rather use self when you are in the same Unit. If you want to use these Forms from other Forms or Units, you must create a new global var of type array[1..10] of TForm1 to hold the ten Forms for access from outside themselves.

After that, you need an activation-procedure to create an show all the Forms, maybe like this:
Delphi-Quellcode:
procedure ShowAllForms;
var
  i: Integer;
begin
  for i := 1 to 10 do
  begin
    Forms[i] := TForm1.Create(Application); // Forms is your array
    Forms[i].Show;
  end;
end;
When done, you can access the Forms through their index
  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 17:52 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz