And if you find that PrevInstance is true, you can use FindWindow and SendMessage to add the file to the previous instance. See this thread for more info (and maybe run a search on PrevInstance in that forum for even more info).
well i'm still having problems with the sending of the data to the existing window : m_hwnd=FindWindow(vbnullstring,"myPLayer") {"myPLayer" being the name of my form} returns 0 and i don't know why? my gues is that this the reson why the setforegroundwindow or setactivewindow does not work any ideas?
thankx everyone
[edited by - bladesnet on March 15, 2004 12:42:40 PM]
so the problem is that the app is running fine but now you can't add files to the playlist while it's running? it seems that you are loading your playlist with a seperate program, is that correct? this sounds like bad design or a broken app to me. why not just modify your app so that there is an "add to playlist" button that you "click", like in winamp or any other mp3 player?
-me
[edited by - Palidine on March 17, 2004 1:11:14 PM]
maybe sending the data wouldn''t be a problem if i could find the preveous instance of my program. all it does is detect that another instance is running and shuts it self down...i would need the FindWindow(vbnullstring,"myPLayer") to return the adress of my previous instance so i would know where to send the data...