🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.internet.web
3 messages
3 total messages Started by Nesbel Fra Wed, 15 Dec 2004 09:32
How to capture events on a TCppWebBrowser...
#1453
Author: Nesbel Fra
Date: Wed, 15 Dec 2004 09:32
9 lines
1026 bytes
Hello:

In my project I need to create TCppWebBrowsers components at runtime, I use:
    TCppWebBrowser* aBrowser = new TCppWebBrowser(pnlWeb);
Somebody know how can I capture events on each "aBrowser" component??

Thanks
Nesbel
Re: How to capture events on a TCppWebBrowser...
#1454
Author: Hans Galema
Date: Thu, 16 Dec 2004 09:16
26 lines
1965 bytes
Nesbel Fra wrote:

> In my project I need to create TCppWebBrowsers components at runtime, I use:
>     TCppWebBrowser* aBrowser = new TCppWebBrowser(pnlWeb);
> Somebody know how can I capture events on each "aBrowser" component??

You can use all eventhandlers that otherwise are created and
assigned by the objectinspector in the ide.

You can once let create an eventhandler by the ide and then assign
it to the property of your at runtime instanciated component.

For instance: The ide can create: the CppWebBrowser1DocumentComplete
eventhandler which you then give your code:

void __fastcall TForm1::CppWebBrowser1DocumentComplete(TObject *Sender,
       LPDISPATCH pDisp, TVariant *URL)
{
	Showmessage ( "CppWebBrowser1DocumentComplete" );
}

Now assign it to your component aBrowser:

  aBrowser->OnDocumentComplete = CppWebBrowser1DocumentComplete;

Hans.
Re: How to capture events on a TCppWebBrowser...
#1455
Author: Nesbel Fra
Date: Thu, 16 Dec 2004 11:36
35 lines
1899 bytes
That's a great solution.

Thanks a lot!

Regards,
Nesbel

Hans Galema <notused@notused.nl> wrote:
>Nesbel Fra wrote:
>
>> In my project I need to create TCppWebBrowsers components at runtime, I use:
>>     TCppWebBrowser* aBrowser = new TCppWebBrowser(pnlWeb);
>> Somebody know how can I capture events on each "aBrowser" component??
>
>You can use all eventhandlers that otherwise are created and
>assigned by the objectinspector in the ide.
>
>You can once let create an eventhandler by the ide and then assign
>it to the property of your at runtime instanciated component.
>
>For instance: The ide can create: the CppWebBrowser1DocumentComplete
>eventhandler which you then give your code:
>
>void __fastcall TForm1::CppWebBrowser1DocumentComplete(TObject *Sender,
>       LPDISPATCH pDisp, TVariant *URL)
>{
>	Showmessage ( "CppWebBrowser1DocumentComplete" );
>}
>
>Now assign it to your component aBrowser:
>
>  aBrowser->OnDocumentComplete = CppWebBrowser1DocumentComplete;
>
>Hans.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads