Re: [perl-win32-gui-users] Net::FTP with AddStatusBar()

2001-01-19 Thread Kevin . ADM-Gibbs
Erick,

I'm convinced that there must be a simple way
to do this but, I've tried everything I can think of
but haven't found it yet.

The PerlDocs seemed to suggest using Forks,
Pipes and/or IPC, but this will probably be
abit more complicated than you want.  You
could redirect STDOUT (and/or STDERR)
to a file while you do the ftp stuff, and read
the contents of the file back once you've
finished.  Doesn't seem right to have to
do it that way though.

Kev.





[EMAIL PROTECTED] on 19/01/2001 06:01:40
To: perl-win32-gui-users@lists.sourceforge.net @ INTERNET
cc:  

Subject: [perl-win32-gui-users] Net::FTP with AddStatusBar()

I guess my question was really how to catch it from
Net::FTP. For example, catch the STDOUT so that I could have
$FTPInfo = "331 User name okay, need password."


> >Is there a way to catch the STDOUT from using Net::FTP
(ie. let $FTPInfo
> >equal the information (string) from Net::FTP) and place
it in
> >
> >$SB = $Window->AddStatusBar(-text => $FTPInfo);
>
> $SB->Text($FTPInfo);
>
> should do the trick.

erick



___
Perl-Win32-GUI-Users mailing list
Perl-Win32-GUI-Users@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users




Re: [perl-win32-gui-users] Event routines

2001-02-07 Thread Kevin . ADM-Gibbs
Thomas,

It is possible to dynamically create windows.  I wrote the
accompanying script in response to a query quite a while
ago.  It creates 4 windows and hides all but one of them.
Clicking OK brings up the next window.

Hope this helps.

Kev.






[EMAIL PROTECTED] on 07/02/2001 12:03:17
To: perl-win32-gui-users@lists.sourceforge.net @ INTERNET
cc:  

Subject: [perl-win32-gui-users] Event routines

Is Win32::GUI designed to support something like this:

$subtxt = "Simple_Click";
eval qq (
  sub main::$subtxt {
print "button clicked\n";
$W->SimpleLabel->Text("Got a click");
}
);

(Actually this piece of code does not work...)

The problem is that I would like to create a number of controls dynamically
because I know the number of controls to
create only at runtime.

regards,
Thomas

___
Perl-Win32-GUI-Users mailing list
Perl-Win32-GUI-Users@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users




dynamic.pl
Description: Binary data


Re: [perl-win32-gui-users] looping in win32 GUI

2001-02-14 Thread Kevin . ADM-Gibbs
Chris,

I guess what you want to do is have a status window on
which you can display the status text from the RASE call?
If that's the case you can do something like this

use Win32::GUI;

my $Win = new Win32::GUI::Window(
  -left   => 341,
  -top=> 218,
  -width  => 300,
  -height => 86,
  -name   => "Win",
  -text   => "RAS Status"
  );

$Win->AddLabel(
   -text=> "  ",
   -name=> "Label",
   -left=> 5,
   -top => 5,
   -width   => 280,
   -height  => 48,
  );

sub display {   #   Update status text
   my $text=shift;
   $Win->Show();
   $Win->BringWindowToTop();
   $Win->Refresh();
   $Win->Label->Text($text);
   $Win->Label->Update();
}

and use display instead of the print in your code
sample.

If you have other windows that you want to run in
the foreground you might want to consider not using
$Win->BringWindowToTop().

Hope that helps.

Kev.




[EMAIL PROTECTED] on 14/02/2001 13:29:22
To: perl-win32-gui-users@lists.sourceforge.net @ INTERNET
cc:  

Subject: [perl-win32-gui-users] looping in win32 GUI

$|=1;
use Win32::RASE;
eval "use Time::HiRes qw(sleep)";
$hrasconn = (RasEnumConnections())[1];
$old_status = -1;
while ( ($status, $status_text) = RasGetConnectStatus($hrasconn) ) {
   if ($status != $old_status) {
   print "$status: $status_text\n";
   $old_status =  $status;
   }
   sleep ($@ ? 1 : 0.01);
}
# error 6 - Invalid handle
($err = Win32::RASE::GetLastError) != 6 and die
Win32::RASE::FormatMessage($err);
exit;


The above code goes into a while loop and constantly checks for the internet
connection and prints connected or disconnected as appropriate

Now my question is how do I use this loop in Win32 GUI

suppose I use the above loop as it is control , will NOT be transferred to
any other part of the program...

I know that Win32::GUI::Dialog(); actually goes into an indefinite loop
looking for keypresses etc

How can I integrate the while loop also into theWin32::GUI::Dialog(); loop ?


hope Im clear with my question if NOT I will elaborate

Thanks

chris
www.perl-resume.com





___
Perl-Win32-GUI-Users mailing list
Perl-Win32-GUI-Users@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users




Re: [perl-win32-gui-users] Shutdown, reboot, logoff and lock on NT and 2000 with perl?

2001-05-22 Thread Kevin . ADM-Gibbs
Tim,

The Win32 module has

 Win32::InitiateSystemShutdown(MACHINE, MESSAGE, TIMEOUT, FORCECLOSE,
REBOOT)

I haven't come across modules which do  of the other things.

Kev.




"Thomas, Timothy B" <[EMAIL PROTECTED]>@lists.sourceforge.net on
21/05/2001 23:20:02

Please respond to perl-win32-gui-users@lists.sourceforge.net

Sent by:  [EMAIL PROTECTED]


To:   "'perl-win32-gui-users@lists.sourceforge.net'"
  
cc:

Subject:  [perl-win32-gui-users] Shutdown, reboot, logoff and lock on NT
  and 2000 with perl?


Are there any Win32::GUI options to to shutdown, reboot, logoff the current
user and/or lock the screen using perl on NT or 2000?

Thanks,
 Tim Thomas

___
Perl-Win32-GUI-Users mailing list
Perl-Win32-GUI-Users@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users






[perl-win32-gui-users] ListView Item Click and Windows 2000

2001-06-12 Thread Kevin . ADM-Gibbs
Has anyone else found that  under Windows 2000 leaving the mouse cursor
over a list view item causes an ItemClick event?  Its almost as if there is
a MouseOver event.

If its not just me that gets this, does anyone have any thoughts on how to
turn this behaviour off so that only a real click of the mouse button
generates the event?

Cheers,

Kevin.




Re: [perl-win32-gui-users] Capturing 'enter key' with Richedit

2001-06-13 Thread Kevin . ADM-Gibbs
Carol,

In the KeyPress sub for the richedit you need to check if enter (ascii 13)
has been pressed.  Something like

 sub RichEdit_KeyPress {
my($key) = @_;

if ($key == 13) then {

   # Enter key pressed

} else {

   # some other key

}

 }

should do it if your rich edit control is called RichEdit.

Kev.





Carolyyne Courtney <[EMAIL PROTECTED]>@lists.sourceforge.net on
13/06/2001 06:48:05

Please respond to perl-win32-gui-users@lists.sourceforge.net

Sent by:  [EMAIL PROTECTED]


To:   perl-win32-gui-users@lists.sourceforge.net
cc:

Subject:  [perl-win32-gui-users] Capturing 'enter key' with Richedit


Hi,

Is there any way that I can capture the 'enter key' when entering text
using
Richedit.

What I am am trying to do is:

The user types in a line of text and then hits enter.
At this point the text is evaluated in a sub routine and a response printed
in the Richedit box.

The user then enters the next line of text ..

Thanks!

Carol.


_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


___
Perl-Win32-GUI-Users mailing list
Perl-Win32-GUI-Users@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users






Re: [perl-win32-gui-users] ListView Item Click and Windows 2000

2001-06-13 Thread Kevin . ADM-Gibbs
Jonathan,

I didn't even notice you'd put Windows 200 until you sent the second email.

Its a shame about the ItemClick event for ListViews, I'd hope to use
ItemClick for selecting and then the double click for doing something with
the selected items.  Guess I'll just have to use double click for selecting
and a button for dealing with the selected items.

Cheers,

Kev.





Jonathan Southwick <[EMAIL PROTECTED]>@lists.sourceforge.net on
12/06/2001 18:46:52

Please respond to perl-win32-gui-users@lists.sourceforge.net

Sent by:  [EMAIL PROTECTED]


To:   perl-win32-gui-users@lists.sourceforge.net
cc:

Subject:  Re: [perl-win32-gui-users] ListView Item Click and Windows 2000


Heh ... I meant Windows 2000; just trying my best to short-change Microsoft
whenever i can.  ;]

And double-lick event?  You'd think I was talking about a lollipop or
something. ;]

Later days ...

Jonathan

Jonathan Southwick
[EMAIL PROTECTED]
Technical & Network Services
Allegheny College, Meadville, PA 16335
(814) 332-2755

At 6/12/2001 12:44 PM, you wrote:

Kevin,

The same thing happens to me in Windows 200 and it happened in NT 4.0 as
well.  The way I got around it was to look for a double-lick event instead.

Something like:

sub DataView_DblClick {

## code for double-click event

}

should work just fine.

DataView is the name given to my list view object.




JonathanJonathan Southwick
[EMAIL PROTECTED]
Technical & Network Services
Allegheny College, Meadville, PA 16335
(814) 332-2755




At 6/12/2001 04:51 PM, you wrote:
Has anyone else found that  under Windows 2000 leaving the mouse cursor
over a list view item causes an ItemClick event?  Its almost as if there is
a MouseOver event.

If its not just me that gets this, does anyone have any thoughts on how to
turn this behaviour off so that only a real click of the mouse button
generates the event?

Cheers,

Kevin.


___
Perl-Win32-GUI-Users mailing list
Perl-Win32-GUI-Users@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users






Re: [perl-win32-gui-users] ListView Item Click and Windows 2000

2001-06-13 Thread Kevin . ADM-Gibbs
Jonathan,

The particular app that this is for will use the ListView to display files.
I was hoping to allow a single click to select a file, further single
clicks to select multiple files and a double click to perform an action on
the files that had been selected.  This would mean over riding the default
action of a single click de-selecting the items that had previously been
selected and then selecting the item the mouse pointer is on.  As leaving
the mouse on an item has the same effect as clicking (and I don't seem to
be able to over ride this) I can't do it that way.

Looking back at that paragraph it looks even more confusing now!

Thanks again for your experience with this.

Kev.





Jonathan Southwick  

<[EMAIL PROTECTED]>  To: 
perl-win32-gui-users@lists.sourceforge.net
Sent by:  cc:   

[EMAIL PROTECTED]Subject: Re: 
[perl-win32-gui-users] ListView Item Click and Windows   
eforge.net2000  





13/06/2001 14:03

Please respond to perl-win32-gui-users  










Kevin,

I'm not sure I understand what you are trying to do.  Do you perform any
actions on the item when an ItemClick (single) is performed or is the
action on the item carried out with a DblClick event?

I have written a program that works like Windows "Find Files or Folders"
but finds users in a database.  I don't even capture the ItemClick event
because no action is carried out until the user performs a DblClick.  I
also capture a RightClick event and bring up a popup menu to allow the user
to select what action should be taken.  Is this a feasible solution for
what you are doing?

Jonathan

Jonathan Southwick
[EMAIL PROTECTED]
Technical & Network Services
Allegheny College, Meadville, PA 16335
(814) 332-2755






Re: [perl-win32-gui-users] ListView Item Click and Windows 2000

2001-06-13 Thread Kevin . ADM-Gibbs
Jonathan,

You're right, removing -hotrack => 1 gives exactly what I want.  You'd
think I might have noticed that option and wondered what it did.  I must be
too used to using GB to design the forms and not be paying any attention to
what all the things are its doing for me.

Thanks very much for that,

Kev.





Jonathan Southwick  

<[EMAIL PROTECTED]>  To: 
perl-win32-gui-users@lists.sourceforge.net
Sent by:  cc:   

[EMAIL PROTECTED]Subject: Re: 
[perl-win32-gui-users] ListView Item Click and Windows   
eforge.net2000  





13/06/2001 16:59

Please respond to perl-win32-gui-users  









Kevin,

I just tried something on my program and it seemed to work just fine.

My guess is you have -hotrack => 1 in your defined ListView object.  try
taking that out and see if you get the results you want.

Jonathan
--
Jonathan Southwick
[EMAIL PROTECTED]
Technical & Network Services
Allegheny College, Meadville, PA 16335
(814) 332-2755








[perl-win32-gui-users] Re: Win32:: GUI Capturing the enter key

2001-06-15 Thread Kevin . ADM-Gibbs

Carol,

Your code looked fine to me but didn't work when I ran it either so I
looked at Aldo's PRIDE program and found that I could only get the keypress
event to be called if I declared a new class and then made the richedit a
member of that class:

 my $EC = new Win32::GUI::Class( # Without this RichEdit KeyPress
Event doesn't get called
 -name => "MyPerlRichEditClass",
 -extends => "RichEdit",
 -widget => "RichEdit",
 );

 $W->AddRichEdit(
 -class   => $EC,
 -name=> "Console",
 -text=> "",
 -left=> 5,
 -top => 5,
 -multiline => 1,
 -width   => $W->ScaleWidth-10,
 -height  => $W->ScaleHeight-10,
 -exstyle  => WS_EX_CLIENTEDGE,
 -style=> WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_HSCROLL
 | ES_LEFT | ES_MULTILINE | ES_AUTOHSCROLL |
ES_AUTOVSCROLL,
 );

I also found that if you want to use the change event you need to do

 $W->Console->SendMessage(1093, 0, 1);  # Enables Change Event for
RichEdit control

I'm afraid my knowledge of XS and the Win32 API isn't up to looking at
Aldo's code to find out why you need to do this.

I've included my modifications to your code the attachment.

Cheers,

Kev.

(See attached file: richedit.pl)





   
Carolyyne   
   
Courtney To: [EMAIL PROTECTED]  
   
<[EMAIL PROTECTED]cc:   

tmail.com>   Subject: Win32:: GUI Capturing the 
enter key  

   
15/06/2001  
   
08:33   
   

   

   




Kevin,

I still can't get this to work!
What am I doing wrong?

Carol

###
use strict;
use Win32::GUI;

my $M = new Win32::GUI::Menu(
  "&Menu" => "menu",
" > &Exit" => "exit",
);

my $W = new Win32::GUI::Window(
  -name=> "main",
  -text=> "Test",
  -left=> 100,
  -top => 100,
  -width   => 400,
  -height  => 300,
  -menu=> $M,
);

$W->AddRichEdit(
-name=> "console",
-text=> "enter something>",
-left=> 5,
-top => 5,
-width   => $W->ScaleWidth-10,
-height  => $W->ScaleHeight-10,
);
#
$W->Show();
Win32::GUI::Dialog();
#
sub console_KeyPress {
  my($key) = @_;

  if ($key == 13) {
print "Enter pressed";
  }
  else {
print "$key";
  }
}

sub exit_Click {
  return -1;
}
_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.





richedit.pl
Description: Binary data


[perl-win32-gui-users] GUI event handling in Modules

2001-10-31 Thread Kevin . ADM-Gibbs
This may have come up before, in which case I apologise, but has anyone
tried creating a module to package up commonly used windows?  I've been
trying this but found I have to export the event (Button_Click etc)
handlers into the Main namespace.   Does anyone know if there is a way to
handle these within the namespace of the package?

Cheers,

Kev.




Re: [perl-win32-gui-users] GUI event handling in Modules

2001-11-01 Thread Kevin . ADM-Gibbs
Johan,

Thanks very much.

 -name => "Packagename::Controlname"

works and is much simpler than changing the XS code.

Cheers,

Kev.





Johan Lindstrom <[EMAIL PROTECTED]> 

Sent by:  To: 
Perl-Win32-GUI-Users@lists.sourceforge.net
[EMAIL PROTECTED]cc:
   
eforge.netSubject: 
Re: [perl-win32-gui-users] GUI event handling in Modules 




31/10/2001 15:30









At 12:58 2001-10-31 +, [EMAIL PROTECTED] wrote:
>This may have come up before, in which case I apologise, but has anyone
>tried creating a module to package up commonly used windows?  I've been
>trying this but found I have to export the event (Button_Click etc)
>handlers into the Main namespace.   Does anyone know if there is a way to
>handle these within the namespace of the package?

-name => "Packagename::Controlname"

should work, but I have never tried it because of the obvious problems with
accessing the control it would impose.


/J

--  --- -- -- -- -  -   ---
Johan LindströmBoss 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
Perl-Win32-GUI-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users






RE: [perl-win32-gui-users] GUI & OLE (WAS: Drag-n-Drop?)

2001-11-05 Thread Kevin . ADM-Gibbs
The only problem I've had with GUI and OLE is that OLE::Constants doesn't
work.  Apart from that it works fine.

Aldo seems to have gone very quiet on new releases but then again he seems
to be developing all the XS code on his own.  A big project for just one
person I'd say.  Anyone sufficiently competent with XS to lend a hand?
Sadly, my attempts at XS haven't got me very far.

Kev.





"Peter Köller"  

<[EMAIL PROTECTED]> To: "Jason 
Bingham" <[EMAIL PROTECTED]>, 
Sent by:  
  
[EMAIL PROTECTED]cc:
   
eforge.netSubject: 
RE: [perl-win32-gui-users] GUI & OLE (WAS: Drag-n-Drop?) 




05/11/2001 07:05









> 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

I think I can find a pieve of code on my harddisk which shows the problems.
Please wait for the end of this week because I am busy.

Peter







[perl-win32-gui-users] Rich Text and Unicode characters

2001-11-13 Thread Kevin . ADM-Gibbs
Has anyone found out how to display unicode characters in a text or rich
edit control?  It doesn't seem to work for me.  'ç' comes out as '├º' when
I try to use it (apologies if various email systems have destroyed the
original character but it was a unicode 00E7 character).

Cheers,

Kev.

Re: [perl-win32-gui-users] cosmetic items

2001-11-29 Thread Kevin . ADM-Gibbs
Howard,

It sounds like you want to have a label next to your check box.  Something
like


 $Window->AddLabel(
-text=> "Click here to enable a great feature",
-name=> "Viewby",
-left=> 500,
-top => 32,
-width   => 45,
-height  => 16,
 );

 $Window->AddCheckbox(
-text=> "",
-name=> "IconVW",
-left=> 700,
-top => 32,
-width   => 15,
-height  => 14,
 );


(I have not checked the distances so the text might be short of the
checkbox or even over run it).

For a different icon, something like

 my $w_icon = new Win32::GUI::Icon("my.ico");

 my $w_class = new Win32::GUI::Class(
-name => "MyUniqueWindowsGuiClass",
-icon => $w_icon,
 );

 $Window = new GUI::Window(
 -name   => "Window",
 -text   => "My App",
 -width  => 500,
 -height => 600,
 -left   => $scr_width-650,
 -top=> $scr_height-550,
 -style  => WS_NORESIZE | WS_SYSMENU | WS_MINIMIZEBOX,
 -class  => $w_class,
 );


The best references I've found for Win32::GUI are the examples that come
bundled in and this list (although last time I looked, the search facility
had stopped working on this list, which is a great shame).

Kev.






"Howard, Steven (US - Tulsa)"   

<[EMAIL PROTECTED]>   To: 
perl-win32-gui-users@lists.sourceforge.net
Sent by:  cc:   

[EMAIL PROTECTED]Subject: 
[perl-win32-gui-users] cosmetic items
eforge.net  





28/11/2001 20:47









I'm familiar with Perl, but I'm working on the first app I've built using
Win32::GUI. For the most part, I have everything functional, but a few
items I am having trouble finding, and would like a few pointers (and a few
pointers to some more good examples and references on GUI) on how to get
this accomplished:

1.  Can I add a caption, or prompt to a check box? Presently, I am
using a read-only text field. That's OK, but it just doesn't look like I
wanted it to look.

2.  Can I replace that camel in the upper LH corner with my company's
logo? I've looked for an example, but have not found it addressed (at least
not in a way I recognize).

Any help would be appreciated - and a pointer to a good online reference
would be REALLY appreciated.

Thanks,

Steve Howard
Sr. DBA DTO
- This message (including any attachments) contains confidential
information intended for a specific individual and purpose, and is
protected by law.  - If you are not the intended recipient, you should
delete this message and are hereby notified that any disclosure, copying,
or distribution of this message, or the taking of any action based on it,
is strictly prohibited






Re: [perl-win32-gui-users] Keyboard accelerators possible?

2002-01-15 Thread Kevin . ADM-Gibbs
Nathan,

I've never tried to use the accelerator key but Aldo's
Pride script does use Ctrl-G from within the RichEdit
field to bring up a dialog box to goto a particular line

I added a few things to this and the code looks like this

 sub Editor_KeyPress {
my($key) = @_;
if ($key == 6 ){  # Ctrl-F
   Find_Click();
} elsif ($key == 7)  {# Ctrl-G
   return 0;
} elsif ($key == 14) {# Ctrl-N
   FindNext_Click();
} elsif ($key == 9)  {# Tab
   return 0;
} elsif ($key == 13) {# Enter

  etc

where the RichEdit field is called Editor.  Something like that might do
what you want,
although the keys only work when the Editor field has focus.

Cheers,

Kev.


Hello,

I'm new to Win32::GUI and trying to solve a problem; I can't find a
thing about it in the mail archives.

Is it possible to define keyboard accelerators for menu items - not the
mnemonics used in conjunction with the Alt key, but the Ctrl characters
that dispatch to menu callbacks (commonly done in GUI applications)?

Nathan Meyers
[EMAIL PROTECTED]

___
Perl-Win32-GUI-Users mailing list
Perl-Win32-GUI-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users




[perl-win32-gui-users] Fork() and BringWindowToTop()

2002-02-19 Thread Kevin . ADM-Gibbs
Hi All,

I'm trying to use fork() to create a parent and child process.  The parent
will deal with Win32::GUI events, tell the child which buttons etc have
been pressed, the child will carry out the actions and update the
appropriate controls on the window.  This way I can allow the main window
to continue reacting to some events (eg refresh, minimise or even quit)
while the processing is performed in the background by the child.

One of the child actions is to bring up a browseforfolder type dialog and
put the selected directories into a text field on the main window.  I can
get this to work fine, except that BringWindowToTop doesn't seem to work
after returning from the browse for folder dialog.  Instead my main window
disappears behind what ever window happens to be behind it.

Bringing up the browseforfolder dialog does require entering a
win32::gui::dialog loop and my guess is that this is what's causing the
problem.  If I alt-tab to the main window it continues to function
normally.

If I move the browseforfolder action into the parent everything works fine
but it would be neater to have all screen updating performed by the child
and it seems slightly odd to get the parent to report the selected
directories to the child so it can update the main window.

Any suggestions?

Cheers,

Kev.




RE: [perl-win32-gui-users] How I have to separe the Win32::GUI between pm module

2002-02-26 Thread Kevin . ADM-Gibbs
Guillem,

I found that things worked best if I fully qualified variable names, eg

  $module_a::window

instead of

  $window

I have a module that I use that I can send you if you want to have a look.

Cheers,

Kev.



|-+>
| |   "Guillem Cunillera Wefers"   |
| |   <[EMAIL PROTECTED]>|
| |   Sent by: |
| |   [EMAIL PROTECTED]|
| |   ceforge.net  |
| ||
| ||
| |   26/02/2002 15:23 |
| ||
|-+>
  
>--|
  | 
 |
  |   To:   "Sean Healy" <[EMAIL PROTECTED]>,   
 |
  | 
 |
  |   cc:   
 |
  |   Subject:  RE: [perl-win32-gui-users] How I have to separe the 
Win32::GUI between pm|
  |module   
 |
  
>--|




Thank you for your attention, but these 2 possible problems doesn't appear
in my program. I think I have a more basic problem.
Let me present how I distribute in pseudocode, for a module that can easy
be
extended to more modules.

---
module_a.pm
---

# all window definition...for instance $window_a

sub initial   ##the first function that is call for another module
{
   ...
   $window_a->Show()
  Win32::GUI::Dialog
  ...
}

sub back  ## when I come from another module with cancel...
{
 ...
  $window_a->Show();
...
}


sub b_go_click  (an event of the window)
 {
   .
   $window_a->Hide();
   Llibreria:module_b::initial();
   .
   return 0;
  }

sub window_a_Terminate
{
 $Window->Hide();
 Llibreria::module_aa::back();
 return 0;
}


I am doing a terrible error ??  How is the easy way do to that without
possible errors ?
All explanations I will receive will be wellcome.
Excuses for my possible English mistakes.
A lot of thanks.






-Mensaje original-
De: Sean Healy <[EMAIL PROTECTED]>
Para: [EMAIL PROTECTED] <[EMAIL PROTECTED]>;
perl-win32-gui-users@lists.sourceforge.net

Fecha: dimarts, 26 / febrer / 2002 15:36
Asunto: Re: [perl-win32-gui-users] How I have to separe the Win32::GUI
between pm module


>>My question is how is possible, or where can be my error, that I need to
>>press more than one time the window close button for the main window.
>>If there is some example about how to work with diferrent pm modules
>>without any problems, I will agree.
>
>I have had this problem in the past, and I have tracked it down to one of
>two things:
>
>1) I have made a second call to Win32::GUI::Dialog inside some event sub,
so
>when I press the close button the first time, that event finishes, but the
>original Win32::GUI::Dialog is still waiting for a -1 to be returned.  If
>you have other windows with their own WIn32::GUI::Dialog calls, be sure
>whatever sub causes a secondary window to close also returns -1.
>
>2) I am inside a Win32::GUI::DoEvents loop, and returning -1 will have no
>real effect until the loop terminates.  (Unless, of course, you explicitly
>check for it - but I never do, because in every situation I've run across,
>it's easier and more efficient to use Win32::GUI::Dialog than to use
>Win32::GUI::DoEvents and check for -1.)
>
>_
>Join the world's largest e-mail service with MSN Hotmail.
>http://www.hotmail.com
>
>


___
Perl-Win32-GUI-Users mailing list
Perl-Win32-GUI-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users






Re: [perl-win32-gui-users] Perl as EXE

2002-02-27 Thread Kevin . ADM-Gibbs
I've been using the latest version of Perl2Exe and it works very well.  The
its doesn't require extra comments to find modules, executables are smaller
than with previous versions, they load quicker, and it works with
Win32::GUI.

Haven't tried ActiveState's PDK.

Kev.



|-+>
| |   "Chirhart, Brian"|
| |   <[EMAIL PROTECTED]> |
| |   Sent by: |
| |   [EMAIL PROTECTED]|
| |   ceforge.net  |
| ||
| ||
| |   26/02/2002 18:02 |
| ||
|-+>
  
>--|
  | 
 |
  |   To:   perl-win32-gui-users@lists.sourceforge.net  
 |
  |   cc:   
 |
  |   Subject:  [perl-win32-gui-users] Perl as EXE  
 |
  
>--|




I am very new to the whole Perl world, but I find it really powerful!!  I
am
curious though on whether you can run a Perl app as an EXE so the end user
would not need to have Perl installed on their PC.  Is this at all
possible?

Sorry if this question does not specifically apply to Win32-GUI


___
Perl-Win32-GUI-Users mailing list
Perl-Win32-GUI-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users






[perl-win32-gui-users] Problem With Fork and Win32::GUI

2002-02-27 Thread Kevin . ADM-Gibbs
I'm getting a problem using using fork() with Win32::GUI and wondered if
anyone else had had any success.

I can get a program to create a pipe for communication, and fork.  I then
have the parent handle the window actions and the child do any actual work
required.  When a windows event happens the parent tells the child what to
do, the child does perfoms the required action and updates the window with
the required results.  The advantage of this method is that you can
minimise or move the window while actions are being performed.

This all works fine (and, as an aside, compiles fine with Perl2Exe) so I
decided to try a further enhancement.  One of my programs uses a module
that can give debugging info to STDOUT.  It seemed a nice idea to capture
this and display it on my window.  To do this I needed a parent to handle
the window, a child to handle screen updating and a further child (or
grandchild) to carry out the required actions.  The pipes required are from
parent to child, and child to grandchild in both directions (ie parent
tells child action to be performed, child tells grandchild, captures
grandchilds STDOUT and displays it in the required control). As psuedo code
this looks something like this

  Use Win32::GUI
  
  my $Win= 
  # create windows with appropriate controls
  # create pipe for parent/child communication

  if ( fork() ) {
  # Parent with GUI event subs
  # start GUI event loop

  } else {
  # Child
  # create pipes for Child/Grandchild communication
 if ( fork() ) {
#Child
# loop {
#   read command from parent
#   report them to grandchild
#   diplay grandchilds output in appropriate control
# }
 } else {
#Grand Child
# loop {
#   Read command from child
#   perform required action
#}
 }
  }

This again works fine, except if a large (I haven't tried to work out the
limit) amount of data is sent from the grandchild and displayed in what
ever contol.  When this happens the program crashes on exit.  The
grandchild and child exit correctly, memory usage shoots and then I get a
Dr Watson error.

My guess is that its something to do with memory allocation for the
control. I've tried using a RichEdit, a TextBox and even displaying the
piped data in the status bar, all with the same results.

Any suggestions?

Thanks,

Kev.








Re: [perl-win32-gui-users] Win32::GUI Release 0.0.665

2002-02-28 Thread Kevin . ADM-Gibbs
I've downloaded and compiled the new version.  The only script I've had
problems with so far is one based on Aldo's pride.pl example but then
pride.pl doesn't work any more either.

Tried a simple test with the NEM and fork() and it still works (except for
the crash on exit with a double fork mentioned yesterday).  Much better
than TK which crashes as soon as I try a fork.

Kev.



|-+>
| |   "Aldo Calpini" <[EMAIL PROTECTED]>   |
| |   Sent by: |
| |   [EMAIL PROTECTED]|
| |   ceforge.net  |
| ||
| ||
| |   28/02/2002 10:02 |
| ||
|-+>
  
>--|
  | 
 |
  |   To:   "Perl-Win32-GUI-Users" 
  |
  |   cc:   
 |
  |   Subject:  [perl-win32-gui-users] Win32::GUI Release 0.0.665   
 |
  
>--|




hello people,

finally, an update! this release of Win32::GUI introduces many new
features,
the most important being:

- the NEM (New Event Model), which allows for something like:

  $Window->AddButton(
  -text => 'say hello',
  -onClick => sub { print "hello, world!\n"; },
  );

  *** editor's note *** there are actually many gotchas with NEM,
  I'll elaborate more on this in a separate post.

- tooltips are now supported on most controls with the -tip => STRING
  option.

- ListView checkboxes can now be managed with the ItemCheck() method;
  there's also a new ItemCheck event for ListViews that gets fired when
  you toggle an item's checkbox.

the biggest changes are in the codebase, which is now splitted in several
files. please note that something - particularly the NEM - may be broken
in this release (you already knew it, huh? ;-)

source code is available at my site (http://dada.perl.it, which is up and
running again :-) and at SourceForge. PPM binaries will follow ASAP -- if
someone wants to pack the binaries for us, please do it (you'll certainly
be faster than me ;-) and send me the files so that I can put it online.

cheers,
Aldo

__END__
$_=q,just perl,,s, , another ,,s,$, hacker,,print;



___
Perl-Win32-GUI-Users mailing list
Perl-Win32-GUI-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users






Re: [perl-win32-gui-users] Using fork to avoid a frozen window while using LWP

2002-03-25 Thread Kevin . ADM-Gibbs
Guillem,

You'll probably find that forking and then using waitpid doesn't do what
you want.  If you're parent process is waiting it won't be able to respond
to user input.  What I think you need to do is disable any user input
controls that might cause problems if they are clicked while you're
downloading, fork, have the child download, the parent return to the  when
the child has finished get it to re-enable the controls, eg

sub download_click {

  # disable controls

  if (fork() ) {
 # empty as parent goes back
 #  to dealing with user  interaction of
 # still enabled controls
  } else {
 # do lwp download
 # renable controls
  }

I haven't tried this but have tried forking earlier, having the child
process do the work and the parent repsond to user input (in my case,
moving the window and minimizing).   This does require communication
between the child and parent.  I've used pipes and it does work most of the
time, although sometimes I get an Dr Watson error when the program is
exited.  I can let you have a copy of a script if you're interested.

Hope that makes sense,

Kev.



|-+>
| |   [EMAIL PROTECTED]  |
| |   Sent by: |
| |   [EMAIL PROTECTED]|
| |   ceforge.net  |
| ||
| ||
| |   23/03/2002 16:08 |
| ||
|-+>
  
>--|
  | 
 |
  |   To:   Perl-Win32-GUI-Users@lists.sourceforge.net  
 |
  |   cc:   
 |
  |   Subject:  [perl-win32-gui-users] Using fork to avoid a frozen window 
while using LWP   |
  
>--|




Can anybody put in this list some example of how to use fork and waitpid
while I am downloading some web pages with LWP. I don't remember how to do
it.

Regards from Catalonia,
Guillem Cunillera i Wefers

___
Perl-Win32-GUI-Users mailing list
Perl-Win32-GUI-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users






Re: [perl-win32-gui-users] popup window

2002-04-10 Thread Kevin . ADM-Gibbs
Make the second window a dialog window and use the -parent option when you
create it  Example code below.

Cheers,

Kev.

use Win32::GUI;

$Win = new Win32::GUI::Window(
  -left   => 341,
  -top=> 218,
  -width  => 300,
  -height => 300,
  -name   => "Win",
  -text   => "Window Title"
  );

$Win->Show();

$Win->AddButton(
   -text=> "Click Me",
   -name=> "Button_1",
   -left=> 117,
   -top => 113,
   -width   => 57,
   -height  => 21,
   -foreground=> 0,
  );

$Win2 = new Win32::GUI::DialogBox(
  -left   => 341,
  -top=> 218,
  -width  => 100,
  -height => 100,
  -name   => "Dialog",
  -text   => "Dialog Box",
  -parent => $Win,
  );
$Win2->AddButton(
   -text=> "Click Me",
   -name=> "DButton_1",
   -left=> 20,
   -top => 20,
   -width   => 57,
   -height  => 21,
   -foreground   => 0,
  );

Win32::GUI::Dialog();

sub Win_Terminate {
   return -1;
}

sub Button_1_Click {
 $Win->Disable();
 $Win2->Show();
}

sub DButton_1_Click {
  $Win2->Hide();
  $Win->Enable();
}


|-+>
| |   [EMAIL PROTECTED] |
| |   Sent by: |
| |   [EMAIL PROTECTED]|
| |   ceforge.net  |
| ||
| ||
| |   10/04/2002 08:01 |
| ||
|-+>
  
>--|
  | 
 |
  |   To:   perl-win32-gui-users@lists.sourceforge.net  
 |
  |   cc:   
 |
  |   Subject:  [perl-win32-gui-users] popup window 
 |
  
>--|




hi. is there any way of stopping a second window from creating an instance
of itself in the taskbar?

thanx


___
Perl-Win32-GUI-Users mailing list
Perl-Win32-GUI-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users






Re: [perl-win32-gui-users] keystrokes

2002-05-18 Thread Kevin . ADM-Gibbs
Mark,

I think something like the example at the below used to work but it doesn't
seem to work any more on my system.  Aldo's PRIDE example had something
like this in it but this doesn't work now on my system either (it only
worked if  I commented out the " -class=> $EditorClass," line from the
definition of the RichEdit control).

Hopefully you'll have better luck than me getting this to work.

Cheers,

Kev.

use Win32::GUI;

$Win = new Win32::GUI::Window(
  -left   => 341,
  -top=> 218,
  -width  => 300,
  -height => 300,
  -name   => "Win",
  -text   => "A Window"
  );

$Win->Show();

$Win->AddRichEdit(
   -text=> "",
   -name=> "MyEdit",
   -multiline => 1,
   -left=> 9,
   -top => 14,
   -width   => 271,
   -height  => 248,
   -addexstyle  => WS_EX_CLIENTEDGE,
   -addstyle=> WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_HSCROLL
   | ES_LEFT | ES_MULTILINE | ES_AUTOHSCROLL |
ES_AUTOVSCROLL,
  );

Win32::GUI::Dialog();

sub MyEdit_KeyPress {
  my $key = shift;
  print "Key: $key\n";
# do what ever action you want depending on the value of key
}

sub MyEdit_Change {
  print "Richedit changed\n";
}

sub Win_Terminate {
   return -1;
}


|-+>
| |   "Mark Di Nicola" |
| |   <[EMAIL PROTECTED]>   |
| |   Sent by: |
| |   [EMAIL PROTECTED]|
| |   ceforge.net  |
| ||
| ||
| |   18/05/2002 01:51 |
| ||
|-+>
  
>--|
  | 
 |
  |   To:   "Peter Eisengrein" <[EMAIL PROTECTED]>, <[EMAIL 
PROTECTED]>,   |
  | 
 |
  |   cc:   
 |
  |   Subject:  Re: [perl-win32-gui-users] keystrokes   
 |
  
>--|





thanks. have you got any examples on how its  supposed to be done?
- Original Message -
From:  Peter  Eisengrein
To: '[EMAIL PROTECTED]' ; perl-win32-gui-users@lists.sourceforge.net
Sent: Saturday, May 18, 2002 4:29  AM
Subject: RE: [perl-win32-gui-users]  keystrokes

There is an 'accelerator' method which does what I think you  want but I've
never been able to make it work. You can fake some of it if the  keystroke
has an associated number value.


> -Original Message-
>  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Thursday, May 16, 2002 20:11
>  To: perl-win32-gui-users@lists.sourceforge.net
> Subject: [perl-win32-gui-users] keystrokes
>
>
> hi. is there any way of associating a keystroke with
> something, like alt+s
> to bring up a settings window?
>
>
>  ___
>
> Have big pipes?  SourceForge.net is looking for download
> mirrors.  We supply
> the hardware. You get the recognition.  Email Us:
> [EMAIL PROTECTED]
> ___
> Perl-Win32-GUI-Users mailing list
> Perl-Win32-GUI-Users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
>







Re: [perl-win32-gui-users] sorting a listview

2002-06-27 Thread Kevin . ADM-Gibbs
Mark,

Haven't had time to examine your code to closely but it looks as though
you're sorting everything as strings.  I assume the quantity should be a
number?

I've used something like the code below to try to deal with this.  I can
send you a working example if you need it and this is your problem.

Cheers,

Kev.

   sub alpascend {
 uc($details{$a}[$col]) cmp uc ($details{$b}[$col]);
   }

   sub numdescend {
 $details{$b}[$col] <=> $details{$a}[$col];
   }

   sub alpdescend {
   uc($details{$b}[$col]) cmp ($details{$a}[$col]);
   }

   sub initlv {
 $Window->ListView->Clear();
 my $rout;

 @index=keys %details;
 $rout= $details{1}[$col]=~ /^\d/ ? "num" : "alp";

 if ($dir==1) {
$rout.="ascend";
 } else {
$rout.="descend";
 }

 @index= sort $rout @index;

 foreach $i (@index) {
   if ($details{$i}[0] ne '..') {
  InsertListItem(0, $details{$i}[0], $details{$i}[1]);
   } else {
  InsertListItem(1, $details{$i}[0], $details{$i}[1]);
   }
 }
 $Window->ListView->SetFocus();
   }

   sub ListView_ColumnClick {
 $col=shift;
 if ($col==$lastcol) {
$dir= $dir * -1;
 } else {
$dir= -1;
 }
 initlv($dir);
 $lastcol=$col;
   }



|-+>
| |   [EMAIL PROTECTED] |
| |   Sent by: |
| |   [EMAIL PROTECTED]|
| |   ceforge.net  |
| ||
| ||
| |   27/06/2002 07:32 |
| ||
|-+>
  
>--|
  | 
 |
  |   To:   perl-win32-gui-users@lists.sourceforge.net  
 |
  |   cc:   
 |
  |   Subject:  [perl-win32-gui-users] sorting a listview   
 |
  
>--|




hi. i've got alist view with 4 columns, being catalogue number, artist,
title and qty (there's 2 other columns but they don't matter) and i've been
trying to figure out how to sort the whole listview on a column click. i
found a message sometime last year where someone posted something that i
kind of got working, after a bit of tweaking. the problem is that the qty
column doesn't sort properly and i just can't seem to figure out why. all
the other columns sort fine when i click on them. any ideas? code below

thanx in advance


sub ListView_ColumnClick {
$totalcols = 6;
my $column = shift;
print "column:$column\n";
$column=$column+1;

## i do this so that I can toggle between ascending and descending
sorts
## 0 = ascending (A-Z), 1 = decending (Z - A)
 if ($lastcolumn == $column) # if you clicked the same column twice in
a row
  {$sortorder = 1 - $sortorder;}  # toggle between 1 and 0 values
 else
 {$sortorder = 0;}
 print "You Clicked $column, last time it was $lastcolumn,sortorder
=$sortorder\n";
 $lastcolumn = $column;

 %data=();
 $rows=$ListView->Count();
 print "rows:$rows\n";
 for $i(0..$rows-1)
  {
  $row="";
  my %result=$ListView->GetItem($i,0);
  $image=$result{-image};
  for $j(0..$totalcols-1)
   {
   my %result=$ListView->GetItem($i,$j);
   $text=$result{-text};
   $row.=",$text";
   }
  $data{$i}="$image$row";
 }

 my %sortcol = NewList($column, %data);
 SortListItem(\%data,\%sortcol,$column);
 if ($sortorder) {
 print "Sorted descending by Column $column\n";
 } else {
 print "Sorted ascending by Column $column\n";
 }
 return;
}

sub SortListItem {
   my ($data,$sortcol,$column) = @_;
   my $check;
   my %data = %$data;
   my %sortcol = %$sortcol;

   $check = "$_" foreach (values %sortcol);

   $ListView->Clear();  ## clear the ListView window
   $index = 0;
   if ($sortorder == 0)
  {  ## this is sorting in ascending order
  if (($column == 1) or ($column == 4))
   {
   print "sorting numerically\n";
foreach (sort {
 (substr($sortcol{$a},0,index($sortcol{$a}," "))) <=>
 (substr($sortcol{$b},0,index($sortcol{$b}," "))) }
keys %sortcol)
{
 my @newdata = split/,/,$data{$_};
 print $data{$_

Re: [perl-win32-gui-users] communication between GUI scripts

2002-07-09 Thread Kevin . ADM-Gibbs
Peter,

Win32::Pipe allows you to use named pipes for interprocess communication.
One process has to act as a server, any others as clients.  You might want
to have a look at the PerlIPC doc as well.

Here's a very simple Win32::Pipe server:

  use Win32::Pipe;

  $p = new Win32::Pipe("MyPipe"); # create pipe
  $res = $p->Connect();   # wait for a process to connect

  while ($data = $p->Read() ) {
print "RECEIVED: $data\n";
  }

  $p->Disconnect();  # disconnect
  $p->Close();# close pipe

and a client

  use Win32::Pipe;

  my $p = new Win32::Pipe(".\\pipe\\MyPipe"); # client must yous
\\server\pipe\pipename syntax

  for ( my $i = 0; $i <=10 ; $i++) {
$p->Write("\$i = $i\n");  # could read from the pipe as well
sleep 1;  # without a delay all the
writes go across at once
  }

  $p->Close();

The problem with this is that while waiting for a connection your server
script won't be able to
respond to user input.  This is going to be a problem you hit with most IPC
methods.

Win32::GUI does give you access to SendMessage in the Win32 api so it may
be possible
to use that.  I have a vague recollection that some of the messages were
user definable but
wouldn't swear to this.  You could look on MSDN to find out.

SendMessage details are at

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/messagesandmessagequeues/messagesandmessagequeuesreference/messagesandmessagequeuesfunctions/sendmessage.asp

Good luck.

Kev.



|-+>
| |   "Straub, Peter (Peter)"  |
| |   <[EMAIL PROTECTED]>|
| |   Sent by: |
| |   [EMAIL PROTECTED]|
| |   ceforge.net  |
| ||
| ||
| |   08/07/2002 17:08 |
| ||
|-+>
  
>--|
  | 
 |
  |   To:   perl-win32-gui-users@lists.sourceforge.net  
 |
  |   cc:   
 |
  |   Subject:  [perl-win32-gui-users] communication between GUI scripts
 |
  
>--|




Hi all,

does anyone know of a reliable way for two Win32::GUI
scripts to communicate with each other? They run as
separated processes.

My idea was to simply write data to a file and send a
notification of some kind to the other process
(concurrent accesses not being an issue here).

What came to my mind in the first place was to use
'PostMessage'. Using Win32::GuiTest I am able to retrieve
the adressee's window handle, but what message should
I post?
As far as I know there is no support for user defined
messages (at least I have no idea how to retrieve one).

I also tried Win32::GuiTest's SendKeys function to notify
a dummy window in the other application by simulating
keystrokes. This gradually turned out to be a real horror
because the receiving control must be the foreground
window in order for SendKeys to succeed and every box
popping up at the wrong time spoils the whole thing...

Could you please help with better ideas how to
accomplish this?

TIA and Cheers,
  Peter


---
This sf.net email is sponsored by:ThinkGeek
Oh, it's good to be a geek.
http://thinkgeek.com/sf
___
Perl-Win32-GUI-Users mailing list
Perl-Win32-GUI-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users






Re: [perl-win32-gui-users] LWP + Fork + Win32::GUI

2002-10-17 Thread Kevin . ADM-Gibbs

Michael,

I did quite a bit of experimenting with Fork and Win32::GUI a while ago.
The main problem I hit was perl crashed when the window closed.  I guessed
there was some sort of memory management problem but couldn't figure out
what.  Eventually I gave up and used a doevents approach (I did try Tk but
this isn't thread safe so crashes as soon as a fork occurs).

If you're still interested in trying fork I've attached one of the scripts
I was playing with.  The fork routines are in a seperate module PipeFork.pm
which I've also included.

The parent handles the windows events, tells the child what events have
occured and the child performs the appropriate actions (in this case
calculating the size of subdirectories).

I'll be interested to hear if you have more success than I did.

Cheers,

Kev.

(See attached file: fork.zip)



|-+>
| |   "Michael Alaly" <[EMAIL PROTECTED]>   |
| |   Sent by: |
| |   [EMAIL PROTECTED]|
| |   ceforge.net  |
| ||
| ||
| |   17/10/2002 15:37 |
| ||
|-+>
  
>--|
  | 
 |
  |   To:   
 |
  |   cc:   
 |
  |   Subject:  [perl-win32-gui-users] LWP + Fork + Win32::GUI  
 |
  
>--|




Hello,

I don't know how to continue a thread that started before I joined the list
so I apologize in advance: "Is possible to modify LWP module in order to
avoid a frozen window ?"

I have spent the morning searching for some solutions involving LWP, Fork
and Win32::GUI. I saw in the archives for this list that some of this has
been discussed before and that one question I can answer had been asked by
"Guillem Cunillera Wefers <[EMAIL PROTECTED]>".

Guillem if you are still interested in how to do this, you will want to use
the callback function in LWP and call the DoEvents() inside that callback.
You can set the number of bytes to read before calling the function. This
should allow you to use DoEvents liberally within any call to LWP.

I have some questions regarding your program if you could contact me
off-list I would apprecaite it. I am new to Win32::GUI and forking and am
trying to do something very similar to what it looked like you were trying
to do. I am attempting to take a list of links from a ListView and send
them
each to a child for download. I am running into lots of problems with fork
and page faults that I can't seem to solve.

Cheers,
Michael



---
This sf.net email is sponsored by: viaVerio will pay you up to
$1,000 for every account that you consolidate with us.
http://ad.doubleclick.net/clk;4749864;7604308;v?
http://www.viaverio.com/consolidator/osdn.cfm
___
Perl-Win32-GUI-Users mailing list
Perl-Win32-GUI-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users

<>


Re: [perl-win32-gui-users] double click buttons

2002-10-22 Thread Kevin . ADM-Gibbs
Usually with this sort of thing I'd disable the window containing the
button, eg

  $win->disable();

If $win is the window with the button in.  You might also want to consider
making the second window a dialogbox and setting its parent to the first
window.  From memory this stops the second window having an icon appear in
the task bar.

Kev.



|-+>
| |   "Magnone, Angelo"|
| |   <[EMAIL PROTECTED]> |
| |   Sent by: |
| |   [EMAIL PROTECTED]|
| |   ceforge.net  |
| ||
| ||
| |   22/10/2002 16:29 |
| ||
|-+>
  
>--|
  | 
 |
  |   To:   "[EMAIL PROTECTED] Sourceforge. Net (E-mail)"   
   |
  | 
 |
  |   cc:   
 |
  |   Subject:  [perl-win32-gui-users] double click buttons 
 |
  
>--|






Anyone know how I can PREVENT a window from appearing more than once... for
example: if I click on a button
that displays a windowwhile that window is open, any other attempts to
display the same window is ignored; including via menu.

:)










Re: [perl-win32-gui-users] Richedit selected text

2002-11-08 Thread Kevin . ADM-Gibbs
Joe,

Something like

 my ($x, $y) = $RE->Selection();

should do it.   $x and $y will be the character positions of the
selection, the whole text in the richedit being treated as a
single long string.  If you want to find out line numbers you
can use

  my $line1=$RE->LineFromChar($x);
  my $line2=$RE->LineFromChar($y);

Cheers,

Kev.



|-+>
| |   [EMAIL PROTECTED] |
| |   Sent by: |
| |   [EMAIL PROTECTED]|
| |   ceforge.net  |
| ||
| ||
| |   07/11/2002 18:01 |
| ||
|-+>
  
>--|
  | 
 |
  |   To:   perl-win32-gui-users@lists.sourceforge.net  
 |
  |   cc:   
 |
  |   Subject:  [perl-win32-gui-users] Richedit selected text   
 |
  
>--|




Hello,

I know that if you have some text selected in Richedit you can get the
start and end position but how to you get the actuall text that is
selected?

Thanks,

Joe






---
This sf.net email is sponsored by: See the NEW Palm
Tungsten T handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
___
Perl-Win32-GUI-Users mailing list
Perl-Win32-GUI-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users






Re: [perl-win32-gui-users] odd hash behavior

2002-11-22 Thread Kevin . ADM-Gibbs
Pete,

You forgot the 'keys' in your foreach statement.

ie

  foreach my $number (%countother)

should be

  foreach my $number ( keys %countother)

otherwise the foreach loops through both keys and values.

Cheers,

Kev.



|-+>
| |   Peter Eisengrein |
| |   <[EMAIL PROTECTED]>   |
| |   Sent by: |
| |   [EMAIL PROTECTED]|
| |   ceforge.net  |
| ||
| ||
| |   22/11/2002 14:38 |
| ||
|-+>
  
>--|
  | 
 |
  |   To:   "Perl-Win32-Gui-Users (E-mail)" 
 |
  |   cc:   
 |
  |   Subject:  [perl-win32-gui-users] odd hash behavior
 |
  
>--|






The script below outputs the correct $number (hash key) but for some reason
it also outputs the value. What gives?

-Pete

###

use strict;

my %countother;

print "File: ";
chomp(my $file=);

open(FILE,$file) || die "can't open file : $!\n";

foreach ()
{
    chomp($_);
    my @line = split(/\,/,$_);
    my ($number) = $line[8] =~ /\"(.*)\"/;
    $countother{$number}++;
}
close(FILE);

my $count = keys %countother;

print "Total of $count numbers used in ~ 1 week.\n";
print "*\n";
print "NUMBER       CALLS\n";

foreach my $number (%countother)
{
    print "$number\n";
}







Re: [perl-win32-gui-users] set button as default

2002-12-13 Thread Kevin . ADM-Gibbs
Marc,

You could give the button focus:

  $Win_info_srv->Button_ok_srv->SetFocus();

would do that.

To have "enter" press the button when another control had focus there
needs to be a way of getting the window to call your button click routine
when enter is pressed.  So far I've only seen this with Tk windows but
hopefully someone else knows how to do it with the GUI module.

Kev.



|-+>
| |   "NAHUM Marc" |
| |   <[EMAIL PROTECTED]>|
| |   Sent by: |
| |   [EMAIL PROTECTED]|
| |   ceforge.net  |
| ||
| ||
| |   13/12/2002 09:46 |
| ||
|-+>
  
>--|
  | 
 |
  |   To:   "Win32-GUI Users" 
   |
  |   cc:   
 |
  |   Subject:  [perl-win32-gui-users] set button as default
 |
  
>--|





how set a button as delault ?

when I put somthing like this :

$Win_info_srv->AddButton(
    -text    => "OK",
    -name    =>  "Button_ok_srv",
   -left     => 190,
   -top  => 185,
   -width   =>  50,
   -height  =>  21,
   -foreground =>  0,
   -tabstop =>  1,
   -default =>  1,
  );

the button is like default but I can't push "enter"  to validate 

thanks for help ...







Re: [perl-win32-gui-users] Scrollbars on Drop List

2002-12-15 Thread Kevin . ADM-Gibbs
Stephen,

Something like

   -addstyle  => WS_VISIBLE | 3 | WS_NOTIFY | WS_VSCROLL,

Should do it.

Kev.



|-+>
| |   "Stephen \"Flame\" Couchman" |
| |   <[EMAIL PROTECTED]> |
| |   Sent by: |
| |   [EMAIL PROTECTED]|
| |   ceforge.net  |
| ||
| ||
| |   14/12/2002 17:23 |
| ||
|-+>
  
>--|
  | 
 |
  |   To:   "Win32-GUI Users" 
   |
  |   cc:   
 |
  |   Subject:  [perl-win32-gui-users] Scrollbars on Drop List  
 |
  
>--|





I have the following

$main->AddCombobox(-name=>'cbConfig',
    -height=>82,
    -width=>356,
    -top=>48,
    -left=>16,
    -tabstop=>1,
    -addstyle=>0x0003,  #Make  DropList
   );

The problem is, that sometimes the list is too  large to see all at once
and you have to scroll down.  I've seen scrollbars  appear in other windows
programs when that happens, but I can't seem to figure  out how to do it
here.

Anyone done it before and know how?

Thanks

~ Ultimate Red Dragon :: Stephen "Flame"  Couchman






Re: [perl-win32-gui-users] "Can't locate loadable object for module Win32::GUI in @INC..."

2003-01-24 Thread Kevin . ADM-Gibbs
Anton,

The answer is it depends.

If you have the source (lots of files, including GUI.xs) you need a C
compiler and the installation is

  perl Makefile.pl
  make
  make install

With some versions

  perl Makefile.pl POLLUTE=1

is required as the first line instead of 'perl Makefile.pl'

NB, with Microsofts Visual C/C++ compiler 'nmake' instead of make

If you have a ppm (a Win32-GUI.ppd file and a directory 'MSWin32...')

  ppm install Win32-GUI

Hope that helps (and that my memory of the installation is correct).

Kev.



|-+>
| |   Anton Yasnitsky <[EMAIL PROTECTED]>|
| |   Sent by: |
| |   [EMAIL PROTECTED]|
| |   ceforge.net  |
| ||
| ||
| |   23/01/2003 21:28 |
| ||
|-+>
  
>--|
  | 
 |
  |   To:   perl-win32-gui-users@lists.sourceforge.net  
 |
  |   cc:   
 |
  |   Subject:  [perl-win32-gui-users] "Can't locate loadable object for 
module Win32::GUI in|
  |@INC..." 
 |
  
>--|




Hi, everybody!


 That's basically my primitive beginner's
question:

what should I do since I downloaded Win32::GUI
0.0.665 from http://dada.perl.it/ (many thanks to
Aldo Calpini!) and unzipped it?

I realize that the whole unzipped contents should
be put somewhere (it says "@INC contains
C:/Perl/lib and C:Perl/site/lib "), but nothing
came out of my exerimenting with moving files
from one directory to another (whatever idiotic
it may look).

So, where to? Or, generally, what to do next?

__
Post your free ad now! http://personals.yahoo.ca


---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
Perl-Win32-GUI-Users mailing list
Perl-Win32-GUI-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users







Re: [perl-win32-gui-users] -style

2003-02-06 Thread Kevin . ADM-Gibbs
Try -addstyle (or in some cases -addexstyle).

Kev.



|-+>
| |   Steven Swenson   |
| |   <[EMAIL PROTECTED]|
| |   >|
| |   Sent by: |
| |   [EMAIL PROTECTED]|
| |   ceforge.net  |
| ||
| ||
| |   06/02/2003 00:58 |
| ||
|-+>
  
>--|
  | 
 |
  |   To:   Win32GUI
 |
  |   cc:   
 |
  |   Subject:  [perl-win32-gui-users] -style   
 |
  
>--|





I got the following message when I created window with a windows style...
What is the new syntax?

Win32::GUI: the -style option is deprecated! at
C:/Perl/site/lib/Win32/GUI.pm li
ne 524.






---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
Perl-Win32-GUI-Users mailing list
Perl-Win32-GUI-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users