e_-:
Where does the code call FindWindow() to get the Audiosurf window's handle?
It finds the Audiosurf window in the constructor of the class.
Public Sub New()
Dim Handle As IntPtr = FindWindow(Nothing, "Audiosurf")
If Handle.Equals(IntPtr.Zero) Then
MessageBox.Show("Audiosurf window not found! Closing...", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
Application.Exit()
End If
AudiosurfHandle = Handle
End Sub
This is how the class is used:
Dim Audiosurf As New ASMethods
Audiosurf.SendString("ascommand playsongvegas c:\nin - way out.mp3")