[perl-win32-gui-users] ProgressBar inside StatusBar?

2003-12-23 Thread student55
Hello,

I have again some small questions:

1.How can I draw StatusBar with multiple panels in it?
  This topic was already discussed about 3 years ago.
  Answer was then "no(t yet :-)". And if I can, how can
  I put ProgressBar inside StatusBar?

2.I have upgraded to 0.0.670 Win32-GUI and now I get
  warning "the -style option is deprecated!"
  when I use   -style => WS_VISIBLE|3|WS_VSCROLL
  in Combobox. How should I change it?

3.Is it important, in which order "use SomeModule"
  statements are wrotten? in particular if I use
  several Win32::* modules , e.g.:
  use Win32::GUI;
  use Win32::OLE;
  use Win32::Process;
  use DBI;
  use Win32::GUI::AxWindow; # after Win32::GUI ??
  use Win32::Sound;
  use Win32;  # topmost or it doesn't matter?

4.I want give to user the possibility to launch my program
  from command line, with TaskPlaner etc. I tried to put GUI
  stuff in sub and don't start it when the program starts
  with some switch (e.g. MyApp.exe -c 1 -g 8). It works fine
  untill I close the program. I get the warning/error:

  (in cleanup) Can't call method "FETCH" on an undefined value
  at C:/Programme/Perl/site/lib/Win32/GUI.pm line 2345 during
  global destruction.
  The line 2445 is relating to DESTROY KillTimer.
  The minimal code :

  #!/usr/bin/perl -w
  use strict;
  use Win32::GUI;
  my ($Window,$t1);
  GUIStart();
  sub GUIStart{
  $Window = new Win32::GUI::Window(
   -pos => [100, 100], # no error,if I comment this out
   -size=> [650, 600],
   -name   => "Window",
   );
   $t1 = $Window->AddTimer('T1',25000); # the same
   $Window->Show();
   Win32::GUI::Dialog();
  }
  sub Window_Terminate {
  return -1;
  } ;
  
  And in general, how much attention should I pay to warnings
  during terminating?? :-)


-- 
Best regards,
Pavel  mailto:[EMAIL PROTECTED]




RE: [perl-win32-gui-users] ProgressBar inside StatusBar?

2003-12-23 Thread Jeremy White

From: <[EMAIL PROTECTED]>
1.How can I draw StatusBar with multiple panels in it?
  This topic was already discussed about 3 years ago.
  Answer was then "no(t yet :-)". And if I can, how can
  I put ProgressBar inside StatusBar?


The answer is still not yet:) The link below contains the message you would 
need to send to create additional parts in the statusbar. If you are 
desperate, then you could try that.


http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/status/messages/sb_setparts.asp

From the same documentation it looks like you can't (easily) add a 

progressbar (only icons and text to each part).



4.I want give to user the possibility to launch my program
  from command line, with TaskPlaner etc. I tried to put GUI
  stuff in sub and don't start it when the program starts
  with some switch (e.g. MyApp.exe -c 1 -g 8). It works fine
  untill I close the program. I get the warning/error:


I couldn't reproduce your error - I may not have understood what you are 
trying to do. The code I used:


  #!/usr/bin/perl -w
  use strict;
  use Win32::GUI;
  my $num = @ARGV;
  print $num if $num;
  my ($Window,$t1);
  #dont start GUI if command line arguments
  GUIStart() unless $num;
  sub GUIStart{
  $Window = new Win32::GUI::Window(
   -pos => [100, 100], # no error,if I comment this out
   -size=> [650, 600],
   -name   => "Window",
   );
   $t1 = $Window->AddTimer('T1',25000); # the same
   $Window->Show();
   Win32::GUI::Dialog();
  }
  sub Window_Terminate {
  return -1;
  } ;

Cheers,

jez.

_
Send a funky MSN Messenger Christmas card http://www.msn.co.uk/christmascard




RE: [perl-win32-gui-users] need help with Graphic

2003-12-23 Thread Jeremy White

Hi,

A couple of months ago I was planning on doing exactly that - I never got 
round to doing it, but it is something that I may have to do in the next 
couple of months. I use GD to draw my charts, and plot them onto the DC with 
Win32::GUI::DIBitmap. There are several different approaches, and I was 
going to go for the lazy route:)


I was planning on doing something like this: On the mouse move, a copy of 
the original chart would be created. The lines would then be drawn on the 
copy, the new image would then be drawn on to the DC. The copying/painting 
to the DC are handled by Win32::GUI::DIBitmap. This method isn’t exactly 
efficient, but would be fast enough for smooth crosshairs as the mouse 
pointer moves around. There is a much more efficient approach, but would 
involve a little more work:)


Feel free to email me off list if you have any questions.



From: Jonathan Southwick <[EMAIL PROTECTED]>
To: Win32-GUI 
Subject: [perl-win32-gui-users] need help with Graphic
Date: Mon, 22 Dec 2003 11:37:15 -0500


I have a Graphic object that I am plotting data on.  While the cursor is on 
this object I have a cross-hairs cursor.  What I would like to do is extend 
lines from the cursor position to the edges of the graph (the perimeter) 
but not have them overwrite what is plotted there and as I move the cursor 
around the lines move accordingly.


It would be the same effect as using a selection tool in any common paint 
program.


I know how to track the current mouse position and i know the values for 
the boundaries of the graph; I just don't know how to produce the effect I 
am wanting.


Has anyone ever accomplished this?  Does anyone know HOW to do it?  Any 
help would be greatly appreciated.


Jonathan

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



---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
___
Perl-Win32-GUI-Users mailing list
Perl-Win32-GUI-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users


_
Send a funky Messenger Christmas card http://www.msn.co.uk/christmascard




Re: [perl-win32-gui-users] Progress bar's [coloring]

2003-12-23 Thread Jonathan Southwick

At 12/1/2003  10:15 AM, Chris wrote:

Okay, I need to know how I can specify a custom color for a progress bar, 
so it can be red or blue, depending on the status of my application. Ive 
tried to do it by changing the fill and color commands and have had no 
luck, if anyone knows anything about how to do this please help, Ive spent 
4 hours trying to figure it out now.



Chris and others,

I have been wanting to do this forever myself but never was able to ... 
until today!!!


I figured out a way to do it and its rather simple.  You need to use 
SendMessage though but it works.


Here is the answer:

$result = SendMessage($hWndControl, PBM_SETBARCOLOR, 0, $color);


To make my ProgressBar red I used the following:

Win32::GUI::SendMessage($Progress, 0x400 + 9, 0, hex('FF'));


I hope this helps.


Jonathan

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

Re: [perl-win32-gui-users] Progress bar's [coloring]

2003-12-23 Thread Jonathan Southwick

At 12/2/2003  01:27 AM, Steve Pick wrote:

Oh dear. I tried so much to get this to work, mucking about with classes and
stuff and I couldn't figure out how. Best way I found is to paint your own
damn rectangle using a Graphic object :) I realise that's not ideal, but
it's the best solution I've got i'm afraid. I'd be interested as well if
anyone can enlighten me on how to do coloured progress bars.

Steve


Steve and others,

I have been wanting to do this forever myself but never was able to ... 
until today!!!


I figured out a way to do it and its rather simple.  You need to use 
SendMessage though but it works.


Here is the answer:

$result = SendMessage($hWndControl, PBM_SETBARCOLOR, 0, $color);


To make my ProgressBar red I used the following:

Win32::GUI::SendMessage($Progress, 0x400 + 9, 0, hex('FF'));


I hope this helps.


Jonathan

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

Re: [perl-win32-gui-users] Progress bar's [coloring]

2003-12-23 Thread Jeremy White

From: Jonathan Southwick <[EMAIL PROTECTED]>
I have been wanting to do this forever myself but never was able to ... 
until today!!!


I figured out a way to do it and its rather simple.  You need to use 
SendMessage though but it works.


Here is the answer:

$result = SendMessage($hWndControl, PBM_SETBARCOLOR, 0, $color);


Nice work. This may be a little cheeky but could you turn this into a method 
(SetColor?) so it could be added to the next build of win32::gui? Might as 
well try and get all these enhancements into the core as they are solved.


Cheers,

jez.

_
Send a funky Messenger Christmas card http://www.msn.co.uk/christmascard




Re: [perl-win32-gui-users] Progress bar's [coloring]

2003-12-23 Thread Левин
> >$result = SendMessage($hWndControl, PBM_SETBARCOLOR, 0, $color);
 GOOD!
But now, please:

PBM_SETBARCOLOR  ( 0x400 + 9 )
PBM_SETBKCOLOR(?)
PBM_SETSTEP  (?)

It is a question silly ;) : 
How I can find itself continuation?
Where to read about it?



Re: [perl-win32-gui-users] Progress bar's [coloring]

2003-12-23 Thread Jonathan Southwick

At 12/24/2003  02:51 AM, =?koi8-r?B?7MXXyc4=?= wrote:

> >$result = SendMessage($hWndControl, PBM_SETBARCOLOR, 0, $color);
 GOOD!
But now, please:

PBM_SETBARCOLOR  ( 0x400 + 9 )
PBM_SETBKCOLOR(?)
PBM_SETSTEP  (?)


PBM_SETBKCOLOR = 0x2000 + 1
PBM_SETSTEP = 0x400 + 4




It is a question silly ;) :
How I can find itself continuation?


I don't understand what you mean by this.


Where to read about it?


Try here:
http://www.mvps.org/vbnet/index.html

Jonathan

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




RE: [perl-win32-gui-users] Progress bar's [coloring]

2003-12-23 Thread Chris
Dude, your awesome I've been needing this forever. Thanks so much.

 

  _  

From: Jonathan Southwick [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 23, 2003 12:43 PM
To: Chris; perl-win32-gui-users@lists.sourceforge.net
Subject: Re: [perl-win32-gui-users] Progress bar's [coloring]

 

At 12/1/2003  10:15 AM, Chris wrote:




Okay, I need to know how I can specify a custom color for a progress bar, so
it can be red or blue, depending on the status of my application. Ive tried
to do it by changing the fill and color commands and have had no luck, if
anyone knows anything about how to do this please help, Ive spent 4 hours
trying to figure it out now.



Chris and others,

I have been wanting to do this forever myself but never was able to ...
until today!!!

I figured out a way to do it and its rather simple.  You need to use
SendMessage though but it works.

Here is the answer:

$result = SendMessage($hWndControl, PBM_SETBARCOLOR, 0, $color);
 
 

To make my ProgressBar red I used the following:

Win32::GUI::SendMessage($Progress, 0x400 + 9, 0, hex('FF'));


I hope this helps.


Jonathan



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


[perl-win32-gui-users] Change Font color

2003-12-23 Thread Chris
Okay, after I create a label, with a custom font color, how can I update it
and make it so it will actually display the new color?

 

$Wmain->AddLabel(

-name => "bwl",

-foreground => $ucolor,

-top  => 1,

-text  => $string,

-left => 1,

-visible => 1,

);

Then inside of a timer I call this

if ($bwu == '') {

logit ("Unable to recive server update");

$string = "Server Error, Please Call 5-1082 For
Help. ";

$ucolor = $skin{'errorcolor'};

$pbcolor = $skin{'pbecolor'};

} else { 

$string = "You have $bwl megs and $bwl1\% left.
";

$ucolor=$skin{'normalcolor'};

$pbcolor = $skin{'pbcolor'};

logit("MAC Data Recived.");

logit ("$bwl megs left for this week $z.\n");

}

Then after that's ran, I use

$Wmain->bwl->Text("$string");

$Wmain->bwl->Change( -foreground => $ucolor );

$Wmain->Progressbar->SetPos($bwl1);

Win32::GUI::SendMessage($Wmain->Progressbar, PBM_SETBARCOLOR, 0,
$pbcolor);

$Wmain->Update();

It updates the color of the progressbar, but not the font color

 

Please help