Need URGENT help with bug in my Dialog box

  • Thread starter Thread starter BillG
  • Start date Start date
B

BillG

I have a dialog box which I pop up with ShowDialog(). On this form, I have
a menu item that when clicked pops up a crystal reports viewer and displays
a report. When the menu item is clicked the report never shows. I tabbed
to another window on my development machine and when I came back, the viewer
was there with the report.

I tried it again waited 5 minutes no report. I tabbed to another window
and came back the report was there. It's like the form for the viewer is
being hidden. I am using ShowDialog() to pop up the viewer. I have checked
the properties on the form and they look find. I have another form with
this same scenario and the viewer pops up nicely. Same code.

Now in addition to this problem, on this same form, i have a grid and a
delete button next to the grid, when the button is clicked nothing happens,
if I happen to touch the alt key the message.show appears that asks if the
user wants to delete the record. Short of me deleteing this form and
recreating it any ideas?

Bill
 
Hello,

Don't know if this affects you, but the only time I have seen behaviour like
this is when the CPU/main thread is really busy - the dialog box never gets
painted but the app acts as if the dialog is visible (you hear the error
sound when you try and select other windows on same ui thread). The only
solution in this case is to lower the load on the CPU/UI thread. Switching
tasks can make the dialog appear (i guess it affects message priorities or
something).

Thanks,

David
 
A fast running WinForms timer can be the culprit for this - say you have a
form with a winforms timer running every 100ms and you open this form again
and again. Eventually the UI thread is so busy trying to service the timer
events that it stops painting some of the forms. Forms come back to live
when clicked (usually stops another form). In this situation modal dialogs
tend to not get painted as the UI thread services the timer events instead
and you end up with these "hidden" message boxes that the app thinks are
present (e.g. cannot select other forms) that the user cannot interact with.

David
 
Back
Top