Function SetWindowIcon(hWnd,ICOfile$) icon=ExtractIconA(hWnd,ICOfile$,0) SetClassLongA(hWnd,-14,icon) End Function
Thats mine from here:-
http://www.blitzbasic.com/codearcs/codearcs.php?code=1589
Only difference between to the two is you use the LoadIcon command, whereas I use the ExtractIcon. Try mine, it does work (just tested it)
Dabz