Example #1
0
 public static extern IntPtr CreateIconIndirect(ref ICONINFO piconinfo);
Example #2
0
 private static Cursor CreateCursor(Bitmap bmpColor) {
     Cursor cursor;
     using(bmpColor) {
         using(Bitmap bitmap = new Bitmap(0x20, 0x20)) {
             ICONINFO piconinfo = new ICONINFO();
             piconinfo.fIcon = false;
             piconinfo.hbmColor = bmpColor.GetHbitmap();
             piconinfo.hbmMask = bitmap.GetHbitmap();
             try {
                 cursor = new Cursor(PInvoke.CreateIconIndirect(ref piconinfo));
             }
             catch {
                 cursor = Cursors.Default;
             }
         }
     }
     return cursor;
 }
Example #3
0
 public static extern IntPtr CreateIconIndirect(ref ICONINFO piconinfo);