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

Post Reply
User avatar
reinaldocrespo
Posts: 918
Joined: Thu Nov 17, 2005 5:49 pm
Location: Fort Lauderdale, FL

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

Post 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

	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.
User avatar
reinaldocrespo
Posts: 918
Joined: Thu Nov 17, 2005 5:49 pm
Location: Fort Lauderdale, FL

Post 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.
Post Reply