> -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of Glenn Linderman > Sent: Thursday, December 16, 2004 5:30 PM > To: YorHel > Cc: Win32-GUI > Subject: Re: [perl-win32-gui-users] A need for a "native" > HTML browser? > > I tend to agree with this assessment... if it is almost free > to include it (not more than 4KB additional size would be my > definition of almost free), then why not? Well, one reason > might be because of the multitude of security holes in IE... > and that alone would make me prefer it being separate... > > Having it as a separately loadable module, but implementing > fixes in Win32::GUI to support it fully, would be the optimum > solution if it isn't almost free. I'd be content to allow > the distributions to be bundled as long as > Win32::GUI::Browser didn't get loaded if it wasn't used... > and if things like PAR & PerlApp would still package > Win32::GUI without including Win32::GUI::Browser if it isn't > needed for the application. > > I don't suppose anyone has figured out how to embed Mozilla? > Now there'd be a solution I could go for! > >
Here. I "believe" you have to install the Mozilla activeX control seperatly from the browser though. I did have some trouble with Events causing a GPF, but am not sure if this is because of the way I coded or not. use Win32::GUI; use Win32::OLE; use Win32::GUI::AxWindow; # main Window $Window = new Win32::GUI::Window ( -title => "Win32::GUI::AxWindow and Win32::OLE", -pos => [100, 100], -size => [600, 600], -name => "Window", ) or die "new Window"; # Create AxWindow $Control = new Win32::GUI::AxWindow ( -parent => $Window, -name => "Control", -pos => [0, 0], -size => [400, 300], -control => "MozillaBrowser.Application", -visible => 1, ) or die "new Control"; # Get Ole object $OLEControl = $Control->GetOLE(); $Control->RegisterEvent("DocumentComplete", sub { $self = shift; $eventid = shift; my %event = $self->GetEventInfo(); foreach $key (keys %event) { print $key, " = ", $event{$key}, "\n"; } } ); $Window->Show(); #Window_Resize(); my $MyURL = "http://msdn.microsoft.com"; $Control->CallMethod("Navigate", $MyURL); Win32::GUI::Dialog(); # Main window event handler sub Window_Terminate { undef $OLEControl; return -1; } sub Window_Resize { if (defined $Window) { ($width, $height) = ($Window->GetClientRect)[2..3]; $Control->Move (0, 0); $Control->Resize ($width, $height); } }