IsIconic in VB2003

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
 
H

Herfried K. Wagner [MVP]

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top