Winforms:带有信息文本的等待光标

3

有没有可能在等待光标旁边显示一个小提示文本。这会是一个很好的功能,可以在用户等待时为用户提供一些活动信息。

2个回答

2

是的。您必须在鼠标位置旁边使用一个标签。只需尝试以下代码:

private void pictureBox1_MouseEnter(object sender, EventArgs e)
        {
            pictureBox1.Cursor = Cursors.WaitCursor;
            Label lb = new Label();
            lb.Location = new Point(MousePosition.X-this.Left,MousePosition.Y-this.Top);
            lb.Text = "Your Info";
            this.Controls.Add(lb);

        }

1

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接