Beefy Boxes and Bandwidth Generously Provided by pair Networks Ovid
Just another Perl shrine
 
PerlMonks  

Re: Win32::GUI questions

by Corion (Pope)
on Aug 24, 2012 at 06:21 UTC ( #989432=note: print w/ replies, xml ) Need Help??


in reply to Win32::GUI questions

As you don't show any relevant code, I can only guess:

For a. - the style the folder pops up is maintained by the OS / the user. In theory, the OS remembers the file picker style for the user.

For b. - how do you call BrowseForFolder()? You can likely give it a "parent window" id, in front of which it pops up. If you pass 0, that means "desktop", which sounds like the symptoms you describe.


Comment on Re: Win32::GUI questions
Re^2: Win32::GUI questions
by HelenCr (Monk) on Aug 24, 2012 at 14:29 UTC

    Esteemed monks: thank you for your efforts.

    Here is the relevant excerpt from the code:

    use strict; use warnings; use 5.014; use Win32::Console; use Win32::GUI(); use autodie; use warnings qw< FATAL utf8 >; use Carp::Always; use Win32API::File::Time qw{:win}; use Image::ExifTool qw(:Public); use Date::Parse; # ... my ( $FileName, $ImageDir, $DIR, $TopDir); # ... $TopDir = 'D:\My Documents'; $ImageDir = Win32::GUI::BrowseForFolder( -root => $TopDir, -includ +efiles => 1,); unless ($ImageDir) { say '$DirName not defined after calling Win32::GUI::BrowseForF +older, ', 'Photo date set line'.__LINE__; exit; } else { say "Identified directory: $ImageDir"; } # now select a file $FileName = Win32::GUI::GetOpenFileName( -title => 'Select an ima +ge file', -directory => $ImageDir, -file => "\0" . " " x 256, -filter => ["Image files (*.jpg)" => "*.jpg;*.jpeg", "All file +s", "*.*", ],); unless ($FileName) { say '$FileName not defined after calling Win32::GUI::GetOpenFi +leName, ', 'Photo date set line'.__LINE__; } else { say "Identified image file: $FileName"; } # ...

Re^2: Win32::GUI questions
by HelenCr (Monk) on Aug 24, 2012 at 14:44 UTC
    For a. - the style the folder pops up is maintained by the OS / the user. In theory, the OS remembers the file picker style for the user.

    How do you set up the style for the picker?

    For b. ... You can likely give it a "parent window" id, in front of which it pops up. If you pass 0, that means "desktop", which sounds like the symptoms you describe.

    I have posted the code. Can you please post an example how to do that right?

    Many TIA - Helen

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://989432]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2014-04-20 03:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (485 votes), past polls