Have you tried:

   $hWnd->Resize($iWidth,$iHeight);

Just a thought.

Regards,
Eric Hansen

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Hirmke Michael
Sent: Wednesday, December 01, 1999 9:47 AM
To: '[EMAIL PROTECTED]'
Subject: RE: [perl-win32-gui] work with existing windows


Hi Aldo,

[...]
> >   $hWnd = GUI::FindWindow( '', $sTitle );
> >   GUI::SetForegroundWindow( $hWnd );
> >   $hWnd->GUI::Resize( $iWidth, $iHeight );
[...]
> 
> the syntax is wrong, try this one:
> 
>     GUI::Resize( $hWnd, $iWidth, $iHeight );
> 
> you need to call the function as if it was 'standalone' and
> pass the obtained handle as the first parameter.

That was my first idea after the -> way didn't work.
But with
     Win32::GUI::Resize( $Window, 100, 100 );

nothing happend. So I supposed it to be the wrong way, too.

After your mail I tried it again, but still doesn't work.
It gives no error either.

$iWidth = 100;
$iHeight = 100;
$hWnd = Win32::GUI::FindWindow( '', "Microsoft Outlook" );
Win32::GUI::SetForegroundWindow( $hWnd );               # <- works
Win32::GUI::Resize( $hWnd, $iWidth, $iHeight ); # <- does nothing

> 
> basically, whenever you invoke a method on an object, the object
> itself is passed as the first parameter; the following two lines
> are completely equivalent:
> 
>     $Window->Resize( 100, 100 );
>     Win32::GUI::Resize( $Window, 100, 100 );
> 
> but the first one is obviously more practical ;-)
> when you work with existing windows, they're not object but mere
> numerical values (handles), so the "->" it's a no-no.
> always use the second form with them.

Thx for clarifying this!

> 
> cheers,
> Aldo

Bye.
Michael.


Reply via email to