我想实现一个功能:有a和b 2个textbox。我可以用鼠标把a文本框里面的文本内容,选中,拖放到b 文本框里面显示。哪个大虾有详细的代码,贴上来看看。听说csdn里面有这个技术文章。但是我找了。没有找到。请大家都帮帮忙。谢谢。恭喜论坛的朋友天天开心快乐
解决方案 »
- 会使用WPF中控件 tabContro 的请进来帮帮小弟……
- datagriview和数据库绑定后直接运行出错,为什么?
- dataGridView 数据绑定后
- winform 里的DataGridView里加入的合计行不参与排序的问题。
- 高手们来看看啦 ComboBox 相关
- 如何知道select 语后的行数?如何将select的某一列绑定到一个ArrayList中?
- TextBox
- 请叫高手,PictureBox 按比例显示图片
- datagrid中时间显示不正常的问题(在线等)
- 在win form程序中如何获取本机的IP地址?(不是web form)
- 5重for循环
- C#修改选中下拉列表的值
TextBox2加上 DragEnter DragDrop 并且设置 AllowDrop = true; private void textBox2_DragEnter(object sender, DragEventArgs e)
{
e.Effect = e.AllowedEffect;
} private void textBox2_DragDrop(object sender, DragEventArgs e)
{
TextBox _TextBox = (TextBox)sender;
object _Ojbect = e.Data.GetData("Text");
if(_Ojbect!=null) _TextBox.Text += e.Data.GetData("Text");
} private string m_Text = "";
private void textBox1_MouseMove(object sender, MouseEventArgs e)
{
TextBox _Text = (TextBox)sender;
m_Text = _Text.SelectedText;
} private void textBox1_MouseDown(object sender, MouseEventArgs e)
{
TextBox _Text = (TextBox)sender;
if (m_Text.Length != 0)
{
_Text.DoDragDrop(m_Text, DragDropEffects.Copy);
m_Text = "";
}
}