Vcl.Net form in Winform application
- From: VT Venkatesh <venks@xxxxxxxx>
- Date: Fri, 31 Mar 2006 22:48:09 +0530
I was looking for a way to use vcl.net components in Winform application.Thanks to the idea given by Narasimha Baliga in the Indug group,I was able to use vcl.net components/form in a Winform application.(I have placed a screen shot of a WinForm application showing a vcl.net form in the Attachments group)
This is how I did it.
I created a vcl.net form separately & added it to the winform application.I commented out the lines
Application.CreateForm(TForm1, Form1); from the dpr file.
Now i included the vcl.net unit to the main form & called it through a button event handler like
**************************
Procedure TWinForm.Button1_Click(sender: System.Object; e: System.EventArgs);
var
form1:Tform1; // Tform1 is the vcl.net form
begin
form1:=Tform1.Create(self);
form1.show;
end;
************************
Now i am able to display the vcl.net form with vcl.net controls in a WinForm application.I have to test it a little more.How ever this is the concept that I followed. If this works as expected, we can have best of both worlds.For e.g. we can use Rave reports in a WinForm application
Venkatesh
.
- Follow-Ups:
- Re: Vcl.Net form in Winform application
- From: Bernhard Geyer
- Re: Vcl.Net form in Winform application
- Prev by Date: Re: What this mean for Borland?
- Next by Date: Re: What this mean for Borland?
- Previous by thread: Class not registred
- Next by thread: Re: Vcl.Net form in Winform application
- Index(es):