> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of [EMAIL PROTECTED]
> Sent: May 23, 2005 7:01 PM
> To: [email protected]
> Subject: Win32::OLE Can you call ShowOpen Method
>
> Hello All,
>
> I would like to use OLE to access the common dialog control.
> I can get access to a number of methods however the ShowOpen
> does not work. Is it possible to use show open to get a File
> Open Dialog. I can do this using Win32::GUI and TK, however
> it would be neat to do it here.
>
> Any help would be great.
>
> Mark
>
> Olegui.pl
>
> -w;
>
> use strict;
>
> use Win32::OLE;
>
> my $CommDlg = Win32::OLE->new("MSComDlg.CommonDialog")|| die
> "Could not start Common Dialog\n";
>
> $CommDlg->ShowPrinter;
>
> $CommDlg->AboutBox;
It looks like OLE wants a few properties to be defined first. Defining only
MaxFileSize did it for me - but I would also add the filters you want too.
$CommDlg->{MaxFileSize} = 400;
$CommDlg->{Filter} = "All(*.*)|\*.\*";
$CommDlg->ShowOpen;
Another option is Win32::FileOp::OpenDialog
Jack
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs