IsIconic in VB2003

  • Thread starter Thread starter cj
  • Start date Start date
C

cj

Can anyone tell me why this always returns False? I've got one instance
of notepad running. It's minimized and showing in the task bar.

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button3.Click
Dim procArray() As System.Diagnostics.Process

procArray = System.Diagnostics.Process.GetProcessesByName("notepad")
If procArray.Length > 0 Then
MessageBox.Show(IsIconic(procArray(0).Handle))
End If
End Sub
 
cj said:
Can anyone tell me why this always returns False? I've got one instance
of notepad running. It's minimized and showing in the task bar.

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button3.Click
Dim procArray() As System.Diagnostics.Process

procArray = System.Diagnostics.Process.GetProcessesByName("notepad")
If procArray.Length > 0 Then
MessageBox.Show(IsIconic(procArray(0).Handle))

'Handle' will return the process handle. You may want to use
'MainWindowHandle' instead.
 
Back
Top