Search code examples
vb.nettextboxmouse-cursor

VB.NET TextBox to follow mouse cursor


Does anybody know how can I make a TextBox follow the mouse cursor on a simple form?


Solution

  • In MouseMove event handler of your form

    textBox.Location = new Point(e.X, e.Y); Invalidate();
    

    e is MouseEventArgs