I'm trying to determine when a key was pressed or mouse was clicked in a
  normal window.  Is there a mouse/key event for normal windows like their
  is in a RichEdit component?

  I'm currently using a Timer to detech a mouse event but it doesn't always
  pick up the mouse click.  Here's what I have so far:

...

$Win->AddTimer("Track_Mouse",20);
 
sub Track_Mouse_Timer {

   ($rcode,$mi,$wparm,$iparm,$time,$x,$y) = Win32::GUI::GetMessage($Win,162,513);

   if ($rcode != -1 && ($mi == 513 || $mi == 162)) {
      ($x,$y) = Win32::GUI::GetCursorPos();
      print "Mouse was clicked at $x - $y\n";
   }
}

   -----------------------
    Is there a better way?

    Thanks.

   -----------
   David Hiltz
   Email: [EMAIL PROTECTED]
   Unix System and Network Administrator
   Northeast Fisheries Science Center
   ######&@&######

Reply via email to