>   LoadIconA = Win32API.new("user32","LoadIcon",['I','P'],"I")
>   FOOICON= LoadIconA.call(0,"myicon.ico")
>
> I think if you give a string as a second argument to the LoadIcon
> call in the user32.dll it'll try and load from a file, but I'm not
> 100% sure.
>
> The docs from MS say that LoadIcon is deprecated and you should
> use LoadImage but that's even more complicated from what I can tell.
> I've found a few examples on the web of people who've used LoadIcon to
> load from .ico files (I think), but none of them are in ruby.  I'm not
> sure if I'm specifying the parameter types correctly using ['I','P']
> for an integer and a string either.  Anyway, it loads a blank icon at
> the moment so it isn't working.

LoadIcon is for loading icons from executable or resource files such as
DLLs. The second argument is the resource ID for the icon, not a filename.
The resource ID can be either a string or an integer less than 65536,
depending on how the icon resource was defined when the DLL was built. The
first argument is an HINSTANCE for the DLL, which you obtain by calling
LoadLibrary or LoadLibraryEx.

To load an icon from a .ico file, use either ExtractIcon or LoadImage.
ExtractIcon is simpler, but it only looks for one size of icon, the "system
large" size, typically 32x32 or 48x48. If you want to be able to control
which size icon you get, use LoadImage instead.

I don't have Ruby code handy to do this, but if you Google for the function
names above you'll get the MSDN documentation for them.

-Mike