![]() |
ActiveX und Form.Show
Hallo liebe Forumsgemeinde,
ich spiele gerade zu ersten mal mit Delphi und ActiveX herum. In meiner ocx möchte ich auf Button-Druck ein neues Form anzeigen lassen. Mit Form.Show bekomme ich eine accessviolation im IE. Wie macht man sowas richtig? Viele Grüße Mirko |
Re: ActiveX und Form.Show
Hallo Mirko
Zeige doch etwas Code. Ohne Code können wir nur raten, warum es eine AV gibt. Gruss Thomas |
Re: ActiveX und Form.Show
Naja.. das ist bis dato alles nur testweise.
Deshalb gibts da nicht viel zu sehen. Ich habe im System ein ActiveX Form und ein Win32 Form das ich über uses an das ActiveX Form eingebunden wird. Dann mache ich einfach: procedure TActiveFormX.Button1Click(Sender: TObject); begin Form2.Show; end; Und dann kommt die access violation. Viele Grüße Mirko |
Re: ActiveX und Form.Show
Aber erzeugt hast Du das Form2 schon, oder?
Sherlock |
Re: ActiveX und Form.Show
Ja, einfach eine Unit mit dem Form2 den Projekt hinzu gefügt.
Gruß Mirko |
Re: ActiveX und Form.Show
Ein normales VCL-Formular wird aber in einer ActiveX-Bilbiothek nirgends erzeugt.
Edit: Ist es überhaupt sinnvoll hier ein VCL-formular zu verwenden? |
Re: ActiveX und Form.Show
Ist - glaube ich - kein Problem, aber erzeugt wird es nicht automatisch.
Also muss an strategischer Stelle noch ein Create. Sherlock |
Re: ActiveX und Form.Show
Jup,
dangeeeee!! Das wars. Application.Create(Tform1.Form1); Und dann Form1.Show; Wenn ich aber das "X" in der Ecke anklicke gehts nicht weg. Aber das riege ich auch noch hin.. Danke nochmal und Gruß Mirko |
Re: ActiveX und Form.Show
sollte es nicht heißen?
Delphi-Quellcode:
Grüße
Form2 := TForm2.create(Form1)
Klaus |
Re: ActiveX und Form.Show
Gehen überhaupt nichtmodale Dialoge (.show) per ActiveX im IE? Was passiert bei einem modalen Dialog (.ShowModal)?
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 13:48 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