Ok grumpy and I started what you said and here is the code I done for your idea and then the code for mine. Plus the outcome:
1. Your Idea
Public Class Form1
Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Integer
Private IEDownload as Int32 = 0
Private Sub IEDownloads()
IEDownload = FindWindow("#32770", "File Download")
MsgBox(IEDownload.ToString + "Download Detected")
End Sub
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim thrblock As New System.Threading.Thread(AddressOf IEDownloads)
thrblock.Start()
End Sub
End Class
^^With that I get the message box as soon as I start the project, regardless if the download window is open or not.
2. My Code
Public Class Form1
Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Integer
Private IEDownload As Int32 = 0
Private Sub IEDownloads()
IEDownload = FindWindow("#32770", "File Download")
MsgBox(IEDownload.ToString + "Download Detected")
End Sub
Private Sub Timer1_Disposed(ByVal sender As Object, ByVal e As System.EventArgs) Handles Timer1.Disposed
Dim thrblock As New System.Threading.Thread(AddressOf IEDownloads)
thrblock.Start()
End Sub
Private Sub Timer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Dim thrblock As New System.Threading.Thread(AddressOf IEDownloads)
thrblock.Start()
End Sub
End Class
^^^ With that the msgbox doesnt appear till AFTER I close the download windows, well actually when I close the running project and I go back to design mode. I think I'm geting close, but much more of this shit, I'll goi back to vb6. lol
No seriously thanks for yalls help thuis far, and hopefully I'm not that far off from fixing this problem.
Also daemon thanks.