Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- myMagCursor = new Cursor("../Resources/magnify.cur");
- //In Visual Studio:
- // 1. Select the cursor file in the Solution Explorer
- // 2. Choose View->Properties.
- // 3. In the properties window switch "Build Action" to "Embedded"
- myMagCursor = new Cursor(GetType(), "magnify.cur");
- namespace Piccolo.Forms
- {
- public partial class Hanger
- {
- ...
- Assembly asm = Assembly.GetExecutingAssembly();
- using( Stream resStream = asm.GetManifestResourceStream("Piccolo.magnify.cur") )
- {
- myMagCursor = new Cursor( resStream );
- }
- canvas1.Cursor = new Cursor(Assembly.GetExecutingAssembly().GetManifestResourceStream("WpfApplication2.mallet.cur"));
- String[] resourceNames = Assembly.GetExecutingAssembly().GetManifestResourceNames();
- using (MemoryStream ms = new MemoryStream(Properties.Resources.magnify))
- {
- myMagCursor = New Cursor(ms);
- }
- this.Cursor = new Cursor(new System.IO.MemoryStream(Properties.Resources.arrow_i));
Add Comment
Please, Sign In to add comment