AGB  ·  Datenschutz  ·  Impressum  







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

Problem mit Application.CreateForm

Ein Thema von FGD · begonnen am 16. Mai 2008 · letzter Beitrag vom 16. Mai 2008
Antwort Antwort
FGD

Registriert seit: 3. Apr 2008
22 Beiträge
 
Delphi 7 Personal
 
#1

Problem mit Application.CreateForm

  Alt 16. Mai 2008, 14:02
Delphi-Quellcode:
program Autocaster;

uses
  Forms,
  Haupt in 'Haupt.pas{Form1};

{$R *.res}

begin
  Application.Initialize;
  Application.CreateForm(TForm1, Form1);
  Application.Run;
end.

Bei Application.CreateForm(TForm1, Form1); kommt die Fehlermeldung:
[Fehler] Autocaster.dpr(11): Undefinierter Bezeichner: 'Form1'

Delphi hat das doch automatisch erstellt, warum kommt da eine Fehlermeldung?
  Mit Zitat antworten Zitat
mkinzler
(Moderator)

Registriert seit: 9. Dez 2005
Ort: Heilbronn
39.851 Beiträge
 
Delphi 11 Alexandria
 
#2

Re: Problem mit Application.CreateForm

  Alt 16. Mai 2008, 14:06
Existiert in Haupt.pas wirklich eine Variable mit dem Namen Form1?
Markus Kinzler
  Mit Zitat antworten Zitat
FGD

Registriert seit: 3. Apr 2008
22 Beiträge
 
Delphi 7 Personal
 
#3

Re: Problem mit Application.CreateForm

  Alt 16. Mai 2008, 14:10
Wenn das damit gemeint ist, dann ja:
Delphi-Quellcode:
type
  TForm1 = class(TForm)
  Mit Zitat antworten Zitat
mkinzler
(Moderator)

Registriert seit: 9. Dez 2005
Ort: Heilbronn
39.851 Beiträge
 
Delphi 11 Alexandria
 
#4

Re: Problem mit Application.CreateForm

  Alt 16. Mai 2008, 14:16
Nein das ist die Klassendefinition

Delphi-Quellcode:
Var
    Form1: TForm1;
Markus Kinzler
  Mit Zitat antworten Zitat
FGD

Registriert seit: 3. Apr 2008
22 Beiträge
 
Delphi 7 Personal
 
#5

Re: Problem mit Application.CreateForm

  Alt 16. Mai 2008, 14:21
Das wars Problem, hab ich wohl aus Versehen rausgelöscht
  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 20:45 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