blinking forms

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all,

Why is it that when I close a form that is displayed using ShowDialog(), my
main application form refreshes or "blinks" but when I use Show() and close
the form, the refresh does not occur?
 
Amil said:
Hi all,

Why is it that when I close a form that is displayed using ShowDialog(), my
main application form refreshes or "blinks" but when I use Show() and close
the form, the refresh does not occur?

How are you closing the form? I've found that if you try to use Hide() or
Close(), the parent is moved in the Z-order, whereas the correct method is
to set the DialogResult property (which I believe is a horrible way of
causing a form to close, but there you have it).

Stu
 
Amil said:
Why is it that when I close a form that is displayed
using ShowDialog(), my main application form refreshes
or "blinks" but when I use Show() and close
the form, the refresh does not occur?

I am not able to reproduce this behavior. How do you show your form, what's
the parent forms's window state, and how do you close the dialog?
 
I have a main MDI form. I have a base form that all MDI children inherits
from. I have another form, confirmationform, that has two buttons: OK and
Cancel. These buttons have a code that says: base.Hide(). These properties
are set:
TopMost = true
ShowInTaskbar = false
StartPosition = CenterScreen

From a MDI child form, I create an instance of the confirmationform by
clicking on a button and use the ShowDialog() method to display it. Clicking
 
Back
Top