一个程序中的片段,我单步执行了一下,顺序很乱,不是我原来想的那样,请问是怎么回事? void txtBox_Enter(object sender, EventArgs e)
{
if (((SWF.TextBox)sender).Multiline)
{
orgtext = ((SWF.TextBox)sender).Text;
} if (!((SWF.TextBox)sender).ReadOnly)
{
((SWF.TextBox)sender).Clear(); ((SWF.TextBox)sender).Multiline = false;
((SWF.TextBox)sender).BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
}
}
{
if (((SWF.TextBox)sender).Multiline)
{
orgtext = ((SWF.TextBox)sender).Text;
} if (!((SWF.TextBox)sender).ReadOnly)
{
((SWF.TextBox)sender).Clear(); ((SWF.TextBox)sender).Multiline = false;
((SWF.TextBox)sender).BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
}
}
解决方案 »
- 编写自动登录的程序时出现【脚本错误】
- 有人做过microsoft office project的二次开发吗? 我想请教一下,我想导入数据到project应该怎么做?分不够我再加,希望能够解决这个问题!
- c# treeview 绑定 数据库(3层的)
- 很急的一个问题,关于显示 MDI 子窗体
- 2005中窗体继承问题(在线等...)
- 50分急问:如何使mdi子窗体与母窗体的融合部分没有边框,WinAPI?
- string型如何转为SQL里的money型呢?
- 使用 WebClient的 UploadValues上传内容包括中文字符的,应该怎么操作?
- 请问用什么方法是来输入int型?
- 这个问题错在什么地方?
- 异常的问题
- 在C#中如何处理类似VB的错误处理
{
SWF.TextBox txt=sender as SWF.TextBox;
if(txt!=null)
{
if(txt.Multiline)
orgtext=txt.Text;
if(txt.ReadOnly)
{
txt.Clear();
txt.Multiline=false;
txt.BorderStyle=System.Windows.Forms.BorderStyle.FixedSingle;
}
}
}
if(txt.ReadOnly)
-->
if(!txt.ReadOnly)