Hi, I'm doing a graphical inside a window, but when I move the window out the borders or when I put another window over the first, the image is cutted.
I attach the module and I am sure that there is  an easy solution.
Thanks,
 
package Mailtool::calculc;
 

use Mailtool::msg;
use Mailtool::accesweb;
use Mailtool::seleccio;
use Win32::GUI;
 
use Mailtool::loginUOC;
 
# =====================
# FINESTRES
# =====================
 
    $w_calculcon = Win32::GUI::Window->new (
 -top  => 0,
 -left  => 0,
 -maxsize => [800,600], 
 -width  => 800,
 -height  => 600,
 -text  => "Resultats Tutor",
 -name  => "Mailtool::calculcon::e_w_calculcon",);
 
# =====================
#       FONTS
# =====================
 
 $fo_normal = Win32::GUI::Font->new (
      -size     => 16,
      -bold     => 0,);
 
  $fo_negreta = Win32::GUI::Font->new (
      -size     => 16,
      -bold     => 1,);
 
  $fo_cursiva = Win32::GUI::Font->new (
       -size     => 14,
      -bold     => 1,
  -italic => 1,);
 
 $fo_petita = Win32::GUI::Font->new (
      -size     => 11,
      -bold     => 0,);
  
 
 
 
# ===================
# PENS
# ===================
 
 my $verd  = new Win32::GUI::Pen(
            -color => 65280
        );
 
 my $blau = new Win32::GUI::Pen(
   -color => 16711680
  );
 
 my $groc = new Win32::GUI::Pen(
   -color => 0x0000FF
  ); 
  
 
 
 

# =====================
# CRIDES EXTERNES
# =====================
 
# -------------------------------------
  sub prepara {
# -------------------------------------
 
 $w_calculcon->Show();
 
 # $Screen = new Win32::GUI::DC("DISPLAY");
 
  $Screen = $w_calculcon->GetDC;
}
 

# -------------------------------------
  sub visualitza {
# -------------------------------------
 
 $refdata = shift(@_);
    $nbusties=shift(@_);
 $posinimin =shift(@_);
 $datamin=shift(@_);
 $posinimax =shift(@_);
 $datamax=shift(@_);
 $refbusties = shift(@_);
 $infotex = shift(@_);
 
 
 ##### crida:  Mailtool::calculc::visualitza(\@data,$busties,$posinimin,$posinimax,$refbusties);
 

 $diesfinestra=7;
 
 
 
 $Screen->Rectangle(50,50, 700,570);
 
 $alcadamax=0;
 $ii = $posinimin;
 while ($ii+$diesfinestra-1<=$posinimax)
 {
  for $jj (0..$nbusties-1)
  {
   $info[$jj][$ii-$posinimin]=0;
   for $kk (0..$diesfinestra-1)
   {
    if (exists ($refdata->[$jj][$ii+$kk]))
    {
     $info[$jj][$ii-$posinimin]=$info[$jj][$ii-$posinimin]+$refdata->[$jj][$ii+$kk];
    }
   }
   if ($info[$jj][$ii-$posinimin]>$alcadamax)
   {
    $alcadamax=$info[$jj][$ii-$posinimin];
   }
  }
  $ii++;
 }
 
 
 $Screen->TextOut(35,25,$infotex);
 
 $Screen->TextOut(5,42,$alcadamax);  # el -8 es pel tamany de la font que es 16
 $Screen->TextOut(5,302,$alcadamax/2);
 $Screen->TextOut(5,562,0);
 
 $Screen->TextOut(30,580,$datamin.'+ 0..6');
 $Screen->TextOut(670,580,$datamax.'+ 0..6');
 
 
 
 $espai=648/($ii-$posinimin-1);
 
 
 for $ll (0..$nbusties-1)
 {
   $ypos[$ll]=570;
   
   if ($ll==0)
   {
    $Screen->SelectObject($blau);
   }
   if ($ll==1)
   {
    $Screen->SelectObject($verd);
   }
   if ($ll==2)
   {
    $Screen->SelectObject($groc);
   }
   
   $Screen->MoveTo(705,80+$ll*60);
   $Screen->LineTo(780,80+$ll*60);
   $Screen->SelectObject($fo_petita);
   $Screen->TextOut(705,80+$ll*60+10,$refbusties->[$ll]->{Nom});
   
   
 }
 
 
 for $i (0..$ii-$posinimin-1)
 {
 
  $xpos = 50 +$espai*$i;
  
  for $ll (0..$nbusties-1)
  {
   if ($ll==0)
   {
    $Screen->SelectObject($blau);
   }
   if ($ll==1)
   {
    $Screen->SelectObject($verd);
   }
   if ($ll==2)
   {
    $Screen->SelectObject($groc);
   }
   
   $yposvell[$ll]=$ypos[$ll];
   $ypos[$ll]=569-520*$info[$ll][$i]/$alcadamax;
   print " y: $ypos[$ll] \n";
   if ($i>0)
   {
    $Screen->MoveTo($xpos-$espai,$yposvell[$ll]);
    $Screen->LineTo($xpos,$ypos[$ll]);
   }
  }
 }
 
 Win32::GUI::Dialog();
  
}
 
 
 
 
 
#sub w_calculcon_Resize {
# print "holllllllllllllllllllllllllllllllllllllaaaaaaaaaaaaaa \n";
#  visualitza($refdata,$nbusties,$posinimin,$datamin,$posinimax,$datamax,$refbusties,$infotex);
#}
 
1;