Skip to main content

[archive] how to stop 'Not Responding'

  • September 12, 2006
  • 3 replies
  • 0 views

[Migrated content. Thread originally posted on 12 September 2006]

I suspect I am being thick here, but can anyone tell me how I can capture mouse clicks in a window where the program is in a busy file reading loop? Although I putup a 'Please Wait' message, if the user gets impatient and clicks in the window the 'not responding' message comes up in the title bar (presumably because I havent responded to the mouse click), then the user thinbks there is something wrong and terminates the job. Howdo I check for these mouse events so I can deal with them?
Keith

3 replies

[Migrated content. Thread originally posted on 12 September 2006]

I suspect I am being thick here, but can anyone tell me how I can capture mouse clicks in a window where the program is in a busy file reading loop? Although I putup a 'Please Wait' message, if the user gets impatient and clicks in the window the 'not responding' message comes up in the title bar (presumably because I havent responded to the mouse click), then the user thinbks there is something wrong and terminates the job. Howdo I check for these mouse events so I can deal with them?
Keith
Look up the configuration switch FILE_IO_PROCESSES_MESSAGES.
By default the cobol application does not process messages during IO to provide the fastest possible file performance. To respond to mouse clicks, you have to process messages which in turn will degredate your file performance.

[Migrated content. Thread originally posted on 12 September 2006]

I suspect I am being thick here, but can anyone tell me how I can capture mouse clicks in a window where the program is in a busy file reading loop? Although I putup a 'Please Wait' message, if the user gets impatient and clicks in the window the 'not responding' message comes up in the title bar (presumably because I havent responded to the mouse click), then the user thinbks there is something wrong and terminates the job. Howdo I check for these mouse events so I can deal with them?
Keith
Interestingly I added a call to test input keyboard status, and used w$getc to check for an escape key depressed, and found that the 'accept w-ans from input status' does trap a mouse click where the subsequent call to w$getc returns "-1". This does mean that the mouse click believes it has been noticed and the 'not responding' doesnt come up. Undocumented feature?
Regards
Keith

[Migrated content. Thread originally posted on 12 September 2006]

I suspect I am being thick here, but can anyone tell me how I can capture mouse clicks in a window where the program is in a busy file reading loop? Although I putup a 'Please Wait' message, if the user gets impatient and clicks in the window the 'not responding' message comes up in the title bar (presumably because I havent responded to the mouse click), then the user thinbks there is something wrong and terminates the job. Howdo I check for these mouse events so I can deal with them?
Keith
It is not an undocumented feature. an ACCEPT does process messages, just using the FILE_IO_PROCESS_MESSAGES does. Altghough, you do need to do an accept if you want to process the mouse activity yourself.