Page 1 of 1

Mouse looses control over a tprinter():new() dialog

PostPosted: Mon Mar 13, 2006 2:06 pm
by reinaldocrespo
Hi,

I've been having this recurring problem. When entering into a tprinter dialog from user, the mouse looses control. Only the keyboard works until either <ok> or <cancel> is selected (via the keyboard).

Here is the code being executed:
Code: Select all  Expand view
   oPrn := tPrinter():New( "Scanned Image Print", .t., .f., iif( nPrinter > 0, aPrinters[ nPrinter ], ), .t. )
   IF empty(oPrn:hDC)
      RETURN NIL
   ENDIF

   nWidth   := int( oPrn:nhorzres() / oImg:nwidth() )
   nHeight   := int( oPrn:nvertres() / oImg:nheight() )
   nTotal   := min( nWidth, nheight )

   if MsgGet("Printer Output Size","Maximum Zoom Level", @nTotal)
      oPrn:StartPage()
      oPrn:sayimage( 2, 2, oImg, oImg:nwidth * ntotal, oImg:nheight * ntotal )
      oPrn:EndPage()
   Endif
   oPrn:End()


Here the mouse freezes while in the printer dialog screen, that's the very first line of code above. So if the user wants to change the number of copies, has to tab to the appropiate place.

I'm using fwh 2.7 + xharb 0.99.6 + borland 5.5.

Has this been observed by anyone else? Any solutions?

Thank you,


Reinaldo.

PostPosted: Wed Mar 22, 2006 11:45 pm
by reinaldocrespo
FYI --Just in case you ever come across this problem, the solution is to issue a releasecapture() just before starting the tprinter instance.

Reinaldo.