System.IO.Stream stream = null;
try
{
string curName = "WindowsApplication1.Cursor1.cur";
stream = GetType().Assembly.GetManifestResourceStream(curName);
this.Cursor = new Cursor( stream );
}
catch ( Exception ex )
{
MessageBox.Show(ex.Message.ToString());
}
finally
{
if ( stream != null )
stream.Close();
}
Contributed from George Shepherd's Windows Forms FAQ