Article View: borland.public.delphi.winforms.controls.using
Article #31Re: vcl .net components in winforms
From: Arie Zilberstein
Date: Mon, 09 Oct 2006 09:08
Date: Mon, 09 Oct 2006 09:08
37 lines
2184 bytes
2184 bytes
Hi, This should be no problem, the usual method of assigning an error handler will work with the TButton. That is, create a procedure whose signature is this: procedure Button1Click(Sender: TObject); and assign it to the button like this: Button1.OnClick := Button1Click; Sometimes you require delegations when you have WinForm controls that act as containers for VCL.NET controls. For example, if you want the online-help (F1) to work, you have to handle HelpRequest in the parent WinForm control (or better, override OnHelpRequested), and there you should invoke something like Forms.Application.HelpCommand(HELP_CONTEXT, InternalControl.HelpContext); Best regards, Arie "Jesse Calato" <jcalato@harriscomputer.com> wrote in message news:45253a8d$1@newsgroups.borland.com... > >>The rest involves various workarounds to make it look smooth. For example, >>some events of the WinForm have to be handled and "delegated" to the >>VCL.NET >>control, e.g. the Resize and others. > > I have a VCL button displaying on a WinForm. How do > I "delegate" the click event to VCL.NET? > > Thanks again.
Technical Details
Message-ID:
<452a119c@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news3.google.com!news2.volia.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<45217487$1@newsgroups.borland.com> <8yqt8mui2oul$.dlg@dlg.marcrohloff.com> <4522cf38$1@newsgroups.borland.com> <45239193$1@newsgroups.borland.com> <45253a8d$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 1eff29,c99f59e38edc8162 X-Google-Attributes: gid1eff29,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Arie Zilberstein" <azilberstein@mercury.com> Newsgroups: borland.public.delphi.winforms.controls.using References: <45217487$1@newsgroups.borland.com> <8yqt8mui2oul$.dlg@dlg.marcrohloff.com> <4522cf38$1@newsgroups.borland.com> <45239193$1@newsgroups.borland.com> <45253a8d$1@newsgroups.borland.com> Subject: Re: vcl .net components in winforms Date: Mon, 9 Oct 2006 11:08:43 +0200 Lines: 39 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2869 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962 X-RFC2646: Format=Flowed; Original NNTP-Posting-Host: 192.118.45.8 Message-ID: <452a119c@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1160384924 192.118.45.8 (9 Oct 2006 02:08:44 -0700) Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news3.google.com!news2.volia.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail