Completed
Last Updated: 13 May 2013 08:41 by ADMIN
ADMIN
Stefan
Created on: 13 May 2013 08:41
Category:
Type: Bug Report
1
FIX. RadRichTextBox - exception when the SystemInformation.CaretBlinkTime is less then 0
To reproduce change the cursor blink rate to the minimum in ControlPanel and try creating an instance of RadRichTextBox

Workaround: use interop to change the SystemInformation.CaretBlinkTime:
 [DllImport("user32.dll")]
        static extern bool SetCaretBlinkTime(int uMSeconds);

        private void radButton1_Click(object sender, EventArgs e)
        {
            int blinkTime = SystemInformation.CaretBlinkTime;

            if (blinkTime < 0)
            {
                SetCaretBlinkTime(int.MaxValue);

            }

            RadRichTextBox asd = new RadRichTextBox();
            asd.Dock = DockStyle.Top;
            this.Controls.Add(asd);

            if (blinkTime < 0)
            {
                SetCaretBlinkTime(blinkTime);
            }
        }
0 comments