RE: [perl-win32-gui-users] Start dir in BrowseForFolder without -root

2006-04-05 Thread Amondsen, Nikolaj Berg DK - AFI
That is perfect!
Thank you very much :)
I wonder why that isn´t mentioned in the documentation, it seems like a normal
and usefull feature.


- Nikolaj


> -Original Message-
> From: darrik [mailto:[EMAIL PROTECTED] 
> Sent: 4. april 2006 21:22
> To: Amondsen, Nikolaj Berg DK - AFI
> Cc: perl-win32-gui-users@lists.sourceforge.net
> Subject: Re: [perl-win32-gui-users] Start dir in 
> BrowseForFolder without -root
> 
> -BEGIN PGP SIGNED MESSAGE-
> Hash: RIPEMD160
> 
> the -directory option specifies starting folder.
> 
> ex.:
> 
> Win32::GUI::BrowseForFolder(
>   -root => 'c:\\',
>   -directory => 'c:\\program files\\',
>   );
> 
> this will start at "c:\program files\" but you can browse up to "c:\"
> (the root).
> 
> ~darrik
> 
> 
> 
> Amondsen, Nikolaj Berg DK - AFI wrote:
> > Hi
> > 
> > Is it possible to specify a startdir for the 
> BrowseForFolder function 
> > so that is is still posible to browse for folders above 
> this folder in 
> > the filestructure.
> > Using -root hides everything above the specified root-dir, 
> allthough 
> > it is still possible to select files outside this dir by 
> filling out 
> > the textfield manually..
> > 
> > What I would like to use this for is having my application 
> start the 
> > BrowseForFolder dialog in the folder most resently used, but still 
> > alloving the user to browse outside that folder.
> > 
> > 
> > - Nikolaj
> > 
> > 
> > ---
> > This SF.Net email is sponsored by xPML, a groundbreaking scripting 
> > language that extends applications into web and mobile 
> media. Attend 
> > the live webcast and join the prime developer group 
> breaking into this new coding territory!
> > http://sel.as-us.falkag.net/sel?cmd=k&kid0944&bid$1720&dat1642
> > ___
> > Perl-Win32-GUI-Users mailing list
> > Perl-Win32-GUI-Users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
> > http://perl-win32-gui.sourceforge.net/
> > 
> > 
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.2.1 (MingW32)
> 
> iD8DBQFEMsdjNLjD3/G9w0YRA/EYAJ4sWk/EgKAq4bci6vQxxZa1Sge+2wCfZTwr
> tQdid6uo+B3ouW72QdopBgI=
> =4V1L
> -END PGP SIGNATURE-
> 



RE: [perl-win32-gui-users] window freezes when connecting to IRC

2006-04-05 Thread Jeremy White
I have been trying to create a GUI for my IRC bot, but no matter what I 
try, the GUI freezes once it connects. I know that the GUI has a loop and 
that NET::IRC has it's own loop; therefore I have used NET::IRC's 
do_one_loop and WIN32::GUI's DoEvents. I've even tried lagging the irc loop 
to get the window to update reguraly, but it didn't work either, here is my 
program's main loop:


while (!$terminate) {
   $window->DoEvents();
   if ($loop > 9 && $connected) {
   $irc->do_one_loop();
   $loop = 0;
   }
   else { $loop++; }
}


Assuming there is no logic issues with the above (add a couple of print 
statements to see if you get to DoEvents) then the only thing I can think of 
is that NET::IRC is doing a blocking call, resulting in a frozen GUI. If 
this is the case, then you are best moving to a threaded solution, were one 
thread deals the GUI, with the other dealing with NET::IRC.


Cheers,

jez.





Re: [perl-win32-gui-users] Start dir in BrowseForFolder without -root

2006-04-05 Thread Reini Urban
Attached patch fixes this issue.

2006/4/5, Amondsen, Nikolaj Berg DK - AFI <[EMAIL PROTECTED]>:
>
> That is perfect!
> Thank you very much :)
> I wonder why that isn´t mentioned in the documentation, it seems like a normal
> and usefull feature.
>
>
> - Nikolaj
>
>
> > -Original Message-
> > From: darrik [mailto:[EMAIL PROTECTED]
> > Sent: 4. april 2006 21:22
> > To: Amondsen, Nikolaj Berg DK - AFI
> > Cc: perl-win32-gui-users@lists.sourceforge.net
> > Subject: Re: [perl-win32-gui-users] Start dir in
> > BrowseForFolder without -root
> >
> > -BEGIN PGP SIGNED MESSAGE-
> > Hash: RIPEMD160
> >
> > the -directory option specifies starting folder.
> >
> > ex.:
> >
> > Win32::GUI::BrowseForFolder(
> >   -root => 'c:\\',
> >   -directory => 'c:\\program files\\',
> >   );
> >
> > this will start at "c:\program files\" but you can browse up to "c:\"
> > (the root).
> >
> > ~darrik
> >
> >
> >
> > Amondsen, Nikolaj Berg DK - AFI wrote:
> > > Hi
> > >
> > > Is it possible to specify a startdir for the
> > BrowseForFolder function
> > > so that is is still posible to browse for folders above
> > this folder in
> > > the filestructure.
> > > Using -root hides everything above the specified root-dir,
> > allthough
> > > it is still possible to select files outside this dir by
> > filling out
> > > the textfield manually..
> > >
> > > What I would like to use this for is having my application
> > start the
> > > BrowseForFolder dialog in the folder most resently used, but still
> > > alloving the user to browse outside that folder.
> > >
> > >
> > > - Nikolaj
> > >
> > >
> > > ---
> > > This SF.Net email is sponsored by xPML, a groundbreaking scripting
> > > language that extends applications into web and mobile
> > media. Attend
> > > the live webcast and join the prime developer group
> > breaking into this new coding territory!
> > > http://sel.as-us.falkag.net/sel?cmd=k&kid0944&bid$1720&dat1642
> > > ___
> > > Perl-Win32-GUI-Users mailing list
> > > Perl-Win32-GUI-Users@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
> > > http://perl-win32-gui.sourceforge.net/
> > >
> > >
> > -BEGIN PGP SIGNATURE-
> > Version: GnuPG v1.4.2.1 (MingW32)
> >
> > iD8DBQFEMsdjNLjD3/G9w0YRA/EYAJ4sWk/EgKAq4bci6vQxxZa1Sge+2wCfZTwr
> > tQdid6uo+B3ouW72QdopBgI=
> > =4V1L
> > -END PGP SIGNATURE-
> >
>
>
> ---
> This SF.Net email is sponsored by xPML, a groundbreaking scripting language
> that extends applications into web and mobile media. Attend the live webcast
> and join the prime developer group breaking into this new coding territory!
> http://sel.as-us.falkag.net/sel?cmdlnk&kid0944&bid$1720&dat1642
> ___
> Perl-Win32-GUI-Users mailing list
> Perl-Win32-GUI-Users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
> http://perl-win32-gui.sourceforge.net/
>


--
Reini Urban
http://phpwiki.org/
http://spacemovie.mur.at/   http://helsinki.at/


doc-directory.patch
Description: Binary data


[perl-win32-gui-users] Enter key to move between text fields

2006-04-05 Thread Scott Spearman
I appologize in advance for my ignorance... I'm not a GUI programmer, have 
never been a GUI programmer, and will probably never BE a GUI programmer.


Somehow, this doesn't matter to managment.

I'm writing a program used for data-entry.  The vast majority of data will 
be input using the number pad.  What I'd like to do is be able to use the 
enter key to move from one text field to the next, ie it starts at the top 
field, I type a 1  and it moves to the second field, and so on, until 
you get to the end, where enter fires off a function that submits the form.


I don't really understand all this talk about Accelerators, and looking 
through the archives, I've seen several things that look useful, but there 
doesn't seem to be any general agreement (that I can see).


I don't have all that many text fields, so putting an individual key trap on 
each of the controls, that just moves focus to the next one, would be just 
fine, I'm just not sure of the best way to do this.  Any help would be 
appreciated.


Thanks! 





Re: [perl-win32-gui-users] window freezes when connecting to IRC

2006-04-05 Thread Roger Mayfield


Assuming there is no logic issues with the above (add a couple of 
print statements to see if you get to DoEvents) then the only thing I 
can think of is that NET::IRC is doing a blocking call, resulting in a 
frozen GUI. If this is the case, then you are best moving to a 
threaded solution, were one thread deals the GUI, with the other 
dealing with NET::IRC.


Cheers,

jez.

yes, you are right, Net::IRC is blocking, even though the documentation 
says that do_one_loop allows it to work with other event based loops 
like Tk. Considering I'm a newbie, I have no idea where to begin using 
threads or processes.  My program will need to share data with the IRC 
thread, so I know forking won't work right even with SIG. I was looking 
at Win32::Process but I'm so confused. Anybody know of a good 
book/website/tutorial/example using Win32::Process?


Roger Mayfield




Re: [perl-win32-gui-users] window freezes when connecting to IRC

2006-04-05 Thread Jeremy White
yes, you are right, Net::IRC is blocking, even though the documentation 
says that do_one_loop allows it to work with other event based loops like 
Tk. Considering I'm a newbie, I have no idea where to begin using threads 
or processes.  My program will need to share data with the IRC thread, so I 
know forking won't work right even with SIG. I was looking at 
Win32::Process but I'm so confused. Anybody know of a good 
book/website/tutorial/example using Win32::Process?


You don't want to be messing with Win32::Process - use threads - a lot 
simpler. As a rule of thumb, with a little care you can share most things 
between threads.


Make sure you have a modern Perl - 5.8.7 is good. There are a couple of 
tutorials in the documentation to get you started - but expect a learning 
curve - thread programming can be a right pain. Once you've got a handle on 
the basics, search this mailing list for GUI thread examples.


Cheers,

jez.





[perl-win32-gui-users] DOS Window minimized?

2006-04-05 Thread Roger Mayfield
I know you can test if a Win32::GUI window has been minimized, but can 
you run a sub if a DOS window has been minimized?


Roger Mayfield



Re: [perl-win32-gui-users] window freezes when connecting to IRC

2006-04-05 Thread Roger Mayfield
Make sure you have a modern Perl - 5.8.7 is good. There are a couple 
of tutorials in the documentation to get you started - but expect a 
learning curve - thread programming can be a right pain. Once you've 
got a handle on the basics, search this mailing list for GUI thread 
examples.


How do you search the mailing list? That little info could prove VERY 
useful.



Roger Mayfield



Re: [perl-win32-gui-users] window freezes when connecting to IRC

2006-04-05 Thread Jeremy White
How do you search the mailing list? That little info could prove VERY 
useful.


http://sourceforge.net/mailarchive/forum.php?forum_id=3220

Cheers,

jez.





[perl-win32-gui-users] Window's Explorer over VPN

2006-04-05 Thread Greg Dance
I've looked on the web for something without finding it and was thinking
of doing it myself but didn't want to re-invent the wheel:

I work remotely and have a very fast internet connection, but Window's
explorer requests so much un-necessary garbage that it is very, very
slow when looking at drives on the corporate server. In fact, I can more
quickly use the Remote Desktop Connection to the server if I need to
move things around or traverse down a few directories.

I've looked at several Window's Explorer replacements to see if they
might be faster, but they really aren't and I suspect that much of that
is due to them using the same underlying Windows OS functions as
Explorer does. I can CD and DIR with blazzing speed at a DOS prompt, but
the GUI's are too slow.

Creating my own explorer using WIN32::GUI was one thing I tossed around,
but I had a question of those familiar with the directory browsing
functions:

Does WIN32::GUI simply use much of the OS's functions for browsing
directories and thus suffer the same SLOW response over a VPN
connection?

If anyone knows of a browser that is faster over a VPN connection (no
need to re-invent the wheel) please let me know.

Greg



RE: [perl-win32-gui-users] DOS Window minimized?

2006-04-05 Thread Jeremy White
I know you can test if a Win32::GUI window has been minimized, but can you 
run a sub if a DOS window has been minimized?


Yes.

If you want to "remove" the DOS window during development of a script, you 
can run it via the command wperl rather than with the command perl.


Cheers,

jez.





Re: [perl-win32-gui-users] DOS Window minimized?

2006-04-05 Thread Roger Mayfield

Jeremy White wrote:



I know you can test if a Win32::GUI window has been minimized, but 
can you run a sub if a DOS window has been minimized?



Yes.

If you want to "remove" the DOS window during development of a script, 
you can run it via the command wperl rather than with the command perl.


No, I'm trying to minimize to tray, I've got the trayicon setup and when 
you click it, it hides the window:


sub _Systray_Click {
   if(Win32::GUI::IsVisible($DOS)) { Win32::GUI::Hide($DOS); }
   else { Win32::GUI::Show($DOS); }
}

Now I want to be able to test if the user has minimized the DOS box and 
minimize it to the tray. With a Win32::GUI::Window you can just create a 
sub like this:


$window = new Win32::GUI::Window( -name => "_window");

sub _window_Minimize {
   $window->Hide();
   return 0;
}

But a DOS window is created this way and I see no way in the docs to 
'name' a DOS window, only to get it's handle:


($DOS) = Win32::GUI::GetPerlWindow();

So, how do I test if the DOS window has been minimized?

Roger Mayfield



RE: [perl-win32-gui-users] Window's Explorer over VPN

2006-04-05 Thread Jeremy White

I've looked at several Window's Explorer replacements to see if they
might be faster, but they really aren't and I suspect that much of that
is due to them using the same underlying Windows OS functions as
Explorer does. I can CD and DIR with blazzing speed at a DOS prompt, but
the GUI's are too slow.

Creating my own explorer using WIN32::GUI was one thing I tossed around,
but I had a question of those familiar with the directory browsing
functions:

Does WIN32::GUI simply use much of the OS's functions for browsing
directories and thus suffer the same SLOW response over a VPN
connection?


Yeah, all the browsing functions are Win32 API, so you wouldn't get any 
improvements.


Assuming Perl internal functions have the same speed as the DOS prompt you 
could hack something together and display the results in a Win32-GUI object.


Cheers,

jez.





Re: [perl-win32-gui-users] Enter key to move between text fields

2006-04-05 Thread Scott Spearman

I tried to modify some code I found on the list to do the key trapping, but
my text fields don't seem to fire KeyDown events, as near as I can tell.
I'm hoping someone can tell me what stupid mistake I'm making in this code:

$bc = $confwin->AddTextfield(
 -name=>"bc",
 -password=>0,
 -prompt => ["Barcode:",-50],
 -pos=>[100,25],
 -tabstop=>1,
 -size=>[150,20],
 -visible=>1);

sub bc_KeyDown()
{
print "IN KEYDOWN!\n";
}

I can launch the app, but when I type anything in the bc text field, I don't
get anything printed to the console as I'd expect it to be.


- Original Message - 
From: "Scott Spearman" <[EMAIL PROTECTED]>

To: 
Sent: Wednesday, April 05, 2006 8:47 AM
Subject: [perl-win32-gui-users] Enter key to move between text fields


I appologize in advance for my ignorance... I'm not a GUI programmer, have 
never been a GUI programmer, and will probably never BE a GUI programmer.


Somehow, this doesn't matter to managment.

I'm writing a program used for data-entry.  The vast majority of data will 
be input using the number pad.  What I'd like to do is be able to use the 
enter key to move from one text field to the next, ie it starts at the top 
field, I type a 1  and it moves to the second field, and so on, 
until you get to the end, where enter fires off a function that submits 
the form.


I don't have all that many text fields, so putting an individual key trap 
on each of the controls, that just moves focus to the next one, would be 
just fine, I'm just not sure of the best way to do this.  Any help would 
be appreciated.


Thanks!


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting 
language
that extends applications into web and mobile media. Attend the live 
webcast
and join the prime developer group breaking into this new coding 
territory!

http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
Perl-Win32-GUI-Users mailing list
Perl-Win32-GUI-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
http://perl-win32-gui.sourceforge.net/ 





Re: [perl-win32-gui-users] Enter key to move between text fields

2006-04-05 Thread Scott Spearman
Ignore my last message, I did in fact do something stupid!  I think I got it 
figured out, but I'll probably have more questions later. 





Re: [perl-win32-gui-users] DOS Window minimized?

2006-04-05 Thread Roger Mayfield
I know you can test if a Win32::GUI window has been minimized, but can 
you run a sub if a DOS window has been minimized?


Roger Mayfield


ok, I found a method within the Win32::GUI called IsVisible to test 
whether the window is visible or not, but this means whether the window 
is hidden or not, it doesn't mean whether it's minimized or not. Can 
someone tell me how to test if the DOS window is minimized or not?


Another way is if I could -name => the DOS window like you would a 
normal Win32::GUI window, then I could just sub _DOSNAME_minimized like 
you would a normal Win32::GUI window?



Roger Mayfield





[perl-win32-gui-users] how to make a MessageBox the top most dialog ?

2006-04-05 Thread oohayf oohayl
hello, 
is there a way to make a MessageBox the top most dialog while looking for some 
win32 window ?
...
@error=WaitWindowLike( $parent, $title, $class);
if ([EMAIL PROTECTED]) {
$MainWin->MessageBox ("Error", "MsgTitle", 0+48); # how to make this 
message the top most dialog ???
}
...


-
Yahoo! Messenger with Voice. PC-to-Phone calls for ridiculously low rates.