Live Chat Icon For mobile
Live Chat Icon

How to load and display a cursor from a resource manifest

Platform: WinForms| Category: Cursors
System.IO.Stream strm = null;
try
{
	string curName = 'WindowsApplication1.Cursor1.cur';
	strm = this.GetType().Assembly.GetManifestResourceStream(curName);
	this.Cursor = new Cursor(strm);
}
catch(Exception ex)
{
	MessageBox.Show(ex.Message.ToString());
}
finally
{
	if(strm != null)
		strm.Close();
}

Share with

Share on twitter
Share on facebook
Share on linkedin

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.