void CreateCaret()
{
if (_byteProvider == null || _keyInterpreter == null || _caretVisible || !this.Focused)
return;
//System.Diagnostics.Debug.WriteLine("CreateCaret()", "HexBox");
// define the caret width depending on InsertActive mode
int caretWidth = (this.InsertActive) ? 1 : (int)_charSize.Width;
int caretHeight = (int)_charSize.Height;
NativeMethods.CreateCaret(Handle, IntPtr.Zero, caretWidth, caretHeight);
UpdateCaret();
NativeMethods.ShowCaret(Handle);
_caretVisible = true;
}