首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

【】怎么可以无效部分窗口

2012-01-01 
【求助】如何可以无效部分窗口?我自己的窗口类:classActTxtOnTransForm:Form{...this.FormBorderStyleFormB

【求助】如何可以无效部分窗口?
我自己的窗口类:
class   ActTxtOnTransForm   :   Form  
{
...
                        this.FormBorderStyle   =   FormBorderStyle.None;
                        this.TopMost   =   true;
                        this.ShowInTaskbar   =   false;

...
}
===============================================

我在按钮1的事件里:
                ActTxtOnTransForm   f;
                private   void   button1_Click(object   sender,   EventArgs   e)
                {
                        f   =   new   ActTxtOnTransForm();
                        f.Show();
                }


我在按钮2的事件里:
                private   void   button2_Click(object   sender,   EventArgs   e)
                {
                        //这个rect在窗口的有效范围内
                        f.Invalidate(new   Rectangle(0,   0,   100,   20));
                }


但是我通过跟踪ActTxtOnTransForm   类的OnPaint(PaintEventArgs   e)函数,发现e.ClipRectangle居然是(0,0,0,0)
那不就是整个窗口全部被无效了吗?

[解决办法]
不可能啊,我这里试过的是对的啊.

热点排行