实现vs中关键词link的效果,输入相关字符时能在浮窗上联想出相关词
winform:在richbox中光标在屏幕中的位置
我用 TextBox做了一个测试:
var source = new AutoCompleteStringCollection();
source.AddRange(new string[]
{
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December"
});
// Create and initialize the text box.
var textBox = new TextBox
{
AutoCompleteCustomSource = source,
AutoCompleteMode =
AutoCompleteMode.SuggestAppend,
AutoCompleteSource =
AutoCompleteSource.CustomSource,
Location = new Point(20, 20),
Width = ClientRectangle.Width - 40,
Visible = true,
ContextMenuStrip = ContextMenuStrip1 // bind your ContextMenuStrip here
};
// Add the text box to the form.
Controls.Add(textBox);
如果你希望Visual Studio 能够拥有一个新功能, 请在以下论坛中提出你的建议: