当前位置:编程学习 > C#/ASP.NET >>

如何在有窗体显示时得到通知?

请问在C#中如何才能在程序运行时有窗体显示时得到通知?注意,要显示的窗体预先是不知道的。使用WindowsAPI也可以,谢谢。 --------------------编程问答-------------------- http://www.codeproject.com/

 private   void   Form2_Load(object   sender,   System.EventArgs   e)   
  {   
  this.Location=new   System.Drawing.Point(Screen.PrimaryScreen.Bounds.Width-this.Width   ,Screen.PrimaryScreen.Bounds.Height);   
  for(int   i=0;i<Screen.PrimaryScreen.Bounds.Height;i++)   
  {   
  for(int   j=0;j<1000000;j++);   
  this.Location   =   new   System.Drawing.Point(this.Location.X   ,Screen.PrimaryScreen.Bounds.Height-i);   
  this.Show();   
  if(i==this.Height)   
  {   
  for(int   k=0;k<this.Height;k++)   
  {   
  for(int   j=0;j<10000000;j++);   
  this.Location   =   new   System.Drawing.Point(this.Location.X   ,this.Location.Y+k);   
  }   
  this.Close();   
  break;   
  }   
  this.Close();   
  } 
补充:.NET技术 ,  .NET Framework
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,