View Single Post
Old 14th October 2004, 21:29   #12
anderslinder
Junior Member
 
Join Date: Jul 2004
Location: UmeƄ, Sweden
Posts: 6
Send a message via ICQ to anderslinder
To 4rfvgz7tdfght4 and Squirrelinabox (If you still have trouble):
The declaration of FindWindow is wrong, it should look like this:
Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Integer

The same is for SendMessage which shold look like this:
Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Integer, ByVal wMsg As Integer, ByVal wParam As Integer, ByRef lParam As Object) As Integer

Long is used in Windows API calls when you use VB6 but not in VB.NET
Look here for Windows API reference for VB.NET.

I have done this myself in VB.NET but I changed to C# when I wanted to make a function that adds tracks to playlist due to problems with pointers.

Hope this will fix your problems.
// Anders
anderslinder is offline   Reply With Quote