如何确定窗体上闪烁的光标位置x,y?
答案 0 :(得分:1)
为此,我使用了yourTextBox.GetPositionFromCharIndex(CharacterIndexAsIntegerTypeHere)
我使用TextBox字符在X轴上移动了ListBox:
Dim Lstb as new ListBox
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
With Lstb
.size = new size(50,50)
.BackColor = Color.aqua
.location = New Point(TextBox1.Location.X + TextBox1.GetPositionFromCharIndex(TextBox1.Text.Length - 1).X, TextBox1.Location.Y + 50)
End with
Controls.Add(Lstb)
End Sub