Re: [BLACKBOX] Program freezes when window loses focus

From: [at]} <Chris>
Date: Tue, 29 Mar 2011 08:31:16 +1030

----boundary-LibPST-iamunique-745411997_-_-
Content-type: text/plain

>-----Original Message-----
>From: BlackBox [mailto:BLACKBOX{([at]})nowhere.xy
>Rex Couture
>Sent: Tuesday, 29 March 2011 4:53 AM
>To: BLACKBOX{([at]})nowhere.xy
>Subject: Re: [BLACKBOX] Program freezes when window loses focus
>
> BlackBox also has a ReadKey method that might be
>applicable. I assume the application is not really freezing,
>and it should respond to keystrokes -- right?
>

Wrong. The problem is related to the way the "Windows Message Queue" is
handled. For a description of how this operates see:

http://msdn.microsoft.com/en-us/library/ms644928(v=vs.85).aspx

The problem is highlighted in the section with the heading "Examining the
Message Queue":

"Unless your application periodically examines the message queue during the
operation for mouse and keyboard messages, it will not respond to user input
until after the operation has completed."

Regards,
Chris Burrows

CFB Software
http://www.cfbsoftware.com
 


----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy----boundary-LibPST-iamunique-745411997_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBcYmx1ZTI1NTt9DQpcdWMxXHBh
cmRccGxhaW5cZGVmdGFiMzYwIFxmMFxmczIwID4tLS0tLU9yaWdpbmFsIE1lc3NhZ2UtLS0tLVxw
YXINCj5Gcm9tOiBCbGFja0JveCBbbWFpbHRvOkJMQUNLQk9YQEx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gbWVzc2FnZSBxdWV1ZSBkdXJpbmcgdGhlXHBhcg0Kb3BlcmF0aW9uIGZv
ciBtb3VzZSBhbmQga2V5Ym9hcmQgbWVzc2FnZXMsIGl0IHdpbGwgbm90IHJlc3BvbmQgdG8gdXNl
ciBpbnB1dFxwYXINCnVudGlsIGFmdGVyIHRoZSBvcGVyYXRpb24gaGFzIGNvbXBsZXRlZC4iIFxw
YXINClxwYXINClJlZ2FyZHMsXHBhcg0KQ2hyaXMgQnVycm93c1xwYXINClxwYXINCkNGQiBTb2Z0
d2FyZVxwYXINCmh0dHA6Ly93d3cuY2Zic29mdHdhcmUuY29tXHBhcg0KIFxwYXINClxwYXINClxw
YXINCi0tLS1ccGFyDQpUbyB1bnN1YnNjcmliZSwgc2VuZCBhIG1lc3NhZ2Ugd2l0aCBib2R5ICJT
SUdOT0ZGIEJMQUNLQk9YIiB0byBMSVNUU0VSVkBMSVNUUy5PQkVST04uQ0hccGFyDQp9
----boundary-LibPST-iamunique-745411997_-_---
Received on Tue Mar 29 2011 - 00:01:16 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:30:16 UTC