I have had no problems with combining the use of Win32::GUI & Win32::OLE in
the same application. Currently I have a Win32::GUI program that sits in the
systray and communicates (read / write) to Outlook calendar & tasks via
Win32::OLE.
Is there any code that shows the problems....
Here is a quick and dirty modified hello.pl from the samples that connects
to outlook and reads the subject of the first item in the inbox and changes
the button text.
use Win32::GUI;
use Win32::OLE;
use Win32::OLE::Variant;
use Win32::OLE::Const 'Microsoft Outlook';
$MW = new Win32::GUI::Window(
-title => 'hello.pl',
-left => 100,
-top => 100,
-width => 150,
-height => 100,
-name => 'MainWindow',
-visible => 1,
);
$hello = $MW->AddButton(
-text => 'Hello, world',
-name => 'Hello',
-left => 25,
-top => 25,
);
$rc = Win32::GUI::Dialog(0);
sub MainWindow_Terminate {
$MW->PostQuitMessage(1);
# return -1;
}
sub Hello_Click {
# Connect to Outlook
my $Outlook = Win32::OLE->new('Outlook.Application', '');
# Connect to active session & Get subject of first message
my $namespace = $Outlook->GetNamespace("MAPI");
my $folder = $namespace->GetDefaultFolder(olFolderInbox);
my $Subject = $folder->{Items}->Item(1)->{Subject};
# Update Button Text
$MW->Hello->{-text} = "$Subject";
}
-----Original Message-----
From: Peter Köller [mailto:[EMAIL PROTECTED]
Sent: Monday, 5 November 2001 2:35 AM
To: [email protected]
Subject: RE: [perl-win32-gui-users] Drag-n-Drop?
> But a Win32::GUI 0.0.559 with DnD-support would be nice. Aldo?
First, I would appreciate a Win32::GUI which works with Win32::OLE ;-) Aldo?
Peter
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of
> Johan Lindstrom
> Sent: Sunday, November 04, 2001 4:38 PM
> To: [email protected]
> Subject: Re: [perl-win32-gui-users] Drag-n-Drop?
>
>
> Margus wrote:
> >On the other hand, is anyone able to compile a PPM of Win32::GUI with
> >drag and drop functionality?
>
> Hmmm... wouldn't want to spread a rouge distribution of
> Win32::GUI, this is
> confusing enough as it is.
>
> But a Win32::GUI 0.0.559 with DnD-support would be nice. Aldo?
>
>
> /J
>
> ------ ---- --- -- -- -- - - - - -
> Johan Lindström Boss Casinos
> Sourcerer [EMAIL PROTECTED]
> http://www.bahnhof.se/~johanl/
> If the only tool you have is a hammer,
> everything tends to look
> like a nail
>
>
>
> _______________________________________________
> Perl-Win32-GUI-Users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
>
_______________________________________________
Perl-Win32-GUI-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users