How to detect is the form is open or not ?????
Printable View
How to detect is the form is open or not ?????
Why don't you alter your derived class so that it provides a public boolean, that will tell you if its open or not.
how are you opening your form?
If , for example, FP is the form you want to check and IF I undertood well what you need, perhaps it could be useful for you (I tested it for 5 seconds, only!!!):
VB Code:
Private Sub BtnTestaFP_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnTestaFP.Click If FP Is Nothing Then MessageBox.Show("E' chiuso!") Else If FP.CanSelect Then MessageBox.Show("E' aperto!") Else MessageBox.Show("E' chiuso!") End If End If End Sub
Good job:) :wave: