I have an if sentence in my vb.net windows form
'If StrComp(WindowState.ToString, FormWindowState.Minimized.ToString) = 0 Then
If Me.WindowState <> System.Windows.Forms.FormWindowState.Normal Then
'[Object].ReferenceEquals(WindowState, FormWindowState.Minimized) Then
' System.Windows.Forms.FormWindowState.Minimized Then ' FormWindowState.Minimized Then
...
The evaluation, as you can se I have tried in different ways, evaluates to true even it should be false. The value is normal and it shows me while debugging or printed out in a msgbox. What I want it to do is having it to go into the if-condition when the value is minimized. My simplest surgestion was "IF (me.WindowState = System.Windows.Forms.FormWindowState.Minimized ) Then" but this does not work. What am I missing???