POV-Ray : Newsgroups : povray.off-topic : Caret, weird ... Server Time
5 Nov 2024 00:26:33 EST (-0500)
  Caret, weird ... (Message 1 to 1 of 1)  
From: Mike Raiford
Subject: Caret, weird ...
Date: 26 Mar 2009 16:25:57
Message: <49cbe4d5$1@news.povray.org>
in C# Create a new form, name it Form7

Replace the template code with the following code:

///////////
  public partial class Form7 : Form
     {
         [System.Runtime.InteropServices.DllImport("User32.dll")]
         private static extern int CreateCaret(IntPtr hWnd,
     IntPtr hBitmap,
     int nWidth,
     int nHeight);

         [System.Runtime.InteropServices.DllImport("User32.dll")]
         private static extern int ShowCaret(IntPtr hWnd);

         public Form7()
         {
             InitializeComponent();
             CreateCaret(this.Handle, this.Icon.ToBitmap().GetHbitmap(), 
0, 0);
             ShowCaret(this.Handle);
         }
     }
//////////

Run it...

I've never ever seen any program use a bitmapped caret before. Ever. 
Windows is capable of it, and it's kinda neat, but I've never ever seen 
it used anywhere...
-- 
~Mike


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.