Delphi-PRAXiS
Seite 1 von 2  1 2      

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   GUI-Design mit VCL / FireMonkey / Common Controls (https://www.delphipraxis.net/18-gui-design-mit-vcl-firemonkey-common-controls/)
-   -   Delphi ActiveX und Form.Show (https://www.delphipraxis.net/127365-activex-und-form-show.html)

oakley 12. Jan 2009 08:59


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

toms 12. Jan 2009 09:10

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

oakley 12. Jan 2009 09:33

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

Sherlock 12. Jan 2009 09:35

Re: ActiveX und Form.Show
 
Aber erzeugt hast Du das Form2 schon, oder?

Sherlock

oakley 12. Jan 2009 11:02

Re: ActiveX und Form.Show
 
Ja, einfach eine Unit mit dem Form2 den Projekt hinzu gefügt.

Gruß

Mirko

sirius 12. Jan 2009 12:06

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?

Sherlock 12. Jan 2009 12:36

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

oakley 12. Jan 2009 14:25

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

Klaus01 12. Jan 2009 14:34

Re: ActiveX und Form.Show
 
sollte es nicht heißen?

Delphi-Quellcode:
Form2 := TForm2.create(Form1)
Grüße
Klaus

Bernhard Geyer 12. Jan 2009 14:36

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 16:48 Uhr.
Seite 1 von 2  1 2      

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