[Mono-winforms-list] Windows Forms.

Simon Ask Ulsnes simon@ulsnes.dk
Tue, 28 Jan 2003 16:42:32 +0100

I am not very skilled/experienced in Win32 programming, thus I have no idea
what a caret is used for... However, I could derive from the MSDN
documentation on the CreateCaret function that they are primarily used to
show/hide certain kinds of graphics?
Nothing that couldn't be achieved using the System.Drawing(.Drawing2D)
(Please correct me if I'm wrong on this)

Yours sincerely,
Simon Ask Ulsnes, Denmark

----- Original Message -----
From: "Geoff Taylor" <geoff@opinionatedgeek.com>
To: <mono-winforms-list@ximian.com>
Sent: Tuesday, January 28, 2003 4:31 PM
Subject: Re: [Mono-winforms-list] Windows Forms.

> Simon Ask Ulsnes wrote:
> >
> > I have not yet come across a single Windows Control that needed API
> > functions. If you know any, please let me know...
> I don't know of any way of implementing a caret without resorting to
> something like:
> [DllImport ("user32.dll")]
> public static extern int CreateCaret (IntPtr hwnd, IntPtr hbm, int iWidth,
> int iHeight);
> [DllImport ("user32.dll")]
> public static extern int DestroyCaret ();
> [DllImport ("user32.dll")]
> public static extern int SetCaretPos (int iX, int iY);
> [DllImport ("user32.dll")]
> public static extern int ShowCaret (IntPtr hwnd);
> [DllImport ("user32.dll")]
> public static extern int HideCaret (IntPtr hwnd);
> > Besides, I think that programmers that want to achieve cross-platform
> > compatibility can cope with the fact that there is no Win32 API on a
> > non-Win32 platform, and find another solution.
> Like not use a caret?  I'm only kidding, but there are some wholes in the
> framework and the way people work around them at the minute is to do
> something like the above DllImport.
> Should they?  Well, their only options are:
> 1) Do the DllImport.
> 2) Write their own caret functionality (which isn't as straightforward as
> may appear).
> 3) Wait until caret functionality appears in MS' .NET Framework.
> It's open to debate what they should do, but most what they _do_ do is use
> DllImport.
>             Geoff
> --
> http://www.opinionatedgeek.com/ :: Part of the solution.
> _______________________________________________
> Mono-winforms-list maillist  -  Mono-winforms-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-winforms-list