o 哦,多谢!多谢!那刚我个忙吧,帮我解决这个问题了,好好的谢你,我的QQ:46924867!
解决方案 »
- 大家都是怎么防止SQL注入攻击的,尤其是多文本输入框?
- pictureBox的方法,麻烦解决一下。
- C#中TextBox中输入文字后按Enter键,直接触发Button控件click事件,下面代码编译后显示(“textBox4_TextChanged”的重载均与委托“System.EventHandler”不匹配)
- 求一个正则表达式
- 在vs2003 下 页面上有个textbox,和一个带连接的图片,我怎么才能把textbox里的值传给图片的连接里
- 请求看看 为什么提示我 当前不存在名称 TextBox1
- 怎样编写模板列的事件代码啊?
- winform 更新程序 跟主程序问题
- 基于C#网络编程的局域网五子棋对战,求大神指导
- 写进来的是乱字符?!
- 頁面更新的問題急。。。。。。。。。。。。。
- 请问怎样远程登陆数据库,并操作数据库?
/// </summary>
[STAThread]
static void Main()
{
Application.Run(new FormMain());
}
const int MaxLenght=2000000; private void FormMain_Load(object sender, System.EventArgs e)
{
textBoxedit.MaxLength=MaxLenght;
textBoxedit.Multiline=true;
textBoxedit.Dock=DockStyle.Fill;
textBoxedit.Text="我的文本编辑器";
textBoxedit.ScrollBars=ScrollBars.Both;
textBoxedit.WordWrap=false;
textBoxedit.ReadOnly=false;
textBoxedit.AcceptsReturn=true;
textBoxedit.AcceptsTab=true;
} private void textBoxEdit_TextChanged(object sender, System.EventArgs e)
{
} private void Undo_Click(object sender, System.EventArgs e)
{
if (textBoxedit.CanUndo == true)
textBoxedit.Undo();
textBoxedit.ClearUndo();
} private void menuItemexit_Click(object sender, System.EventArgs e)
{
this.Close();
} private void Cut_Click(object sender, System.EventArgs e)
{
if (textBoxedit.SelectedText != "")
textBoxedit.Cut();
} private void Copy_Click(object sender, System.EventArgs e)
{
if (textBoxedit.SelectionLength>0)
textBoxedit.Copy();
} private void Paste_Click(object sender, System.EventArgs e)
{
if (Clipboard.GetDataObject().GetDataPresent(DataFormats.Text)==true)
{if(textBoxedit.SelectionLength>0)
{ DialogResult result; result = MessageBox.Show("你想覆盖所选择的文本吗?","覆盖确认",MessageBoxButtons.YesNo);
if(result==DialogResult.No) {textBoxedit.SelectionStart=textBoxedit.SelectionStart + textBoxedit.SelectionLength;}}
textBoxedit.Paste();
}
} private void Del_Click(object sender, System.EventArgs e)
{
textBoxedit.SelectedText.Remove(1,textBoxedit.SelectionLength);
} private void Selall_Click(object sender, System.EventArgs e)
{
textBoxedit.SelectAll();
}
}