易截截图软件、单文件、免安装、纯绿色、仅160KB

C#绘制圆角窗体

public   void   SetWindowRegion()    
  {    
 
System.Drawing.Drawing2D.GraphicsPath   FormPath;    
  FormPath   =
  new   System.Drawing.Drawing2D.GraphicsPath();    
  Rectangle  
rect=new  
Rectangle(0,22,this.Width,this.Height-22);//this.Left-10,this.Top-10,this.Width-10,this.Height-10);
               
  FormPath   =   GetRoundedRectPath(rect,   30);  
 
this.Region   =   new   Region(FormPath);    
  }  
  private  
GraphicsPath   GetRoundedRectPath(Rectangle   rect,   int   radius)    

  {  
  int   diameter   =   radius;  
  Rectangle  
arcRect   =   new   Rectangle(rect.Location,   new   Size(diameter,  
diameter));  
  GraphicsPath   path   =   new   GraphicsPath();  
 
//   左上角  
  path.AddArc(arcRect,   180,   90);  
  //   右上角  
 
arcRect.X   =   rect.Right   -   diameter;  
  path.AddArc(arcRect,
  270,   90);  
  //   右下角  
  arcRect.Y   =   rect.Bottom   -  
diameter;  
  path.AddArc(arcRect,   0,   90);  
  //   左下角  
 
arcRect.X   =   rect.Left;  
  path.AddArc(arcRect,   90,   90);  
 
path.CloseFigure();  
  return   path;  
  }  
  protected  
override   void   OnResize(System.EventArgs   e)    
  {    
 
this.Region   =   null;    
  SetWindowRegion();  


相关文档:

C#中用XmlDocument对象获取XML文件中的节点值

 xml文件:
<?xml version="1.0" encoding="utf-8" ?>
<bookstore>
  <book>
    <title lang="eng">Harry Potter</title>
    <price>29.99</price>
  </book>
  <book>
......

在C#中运用 SQLite

  SQLite 是一个嵌入式的联系数据库系统,运用十分广泛。在一些数据量不大的运用 程序中,假如运用 SQLite可以极大的降低部署时的工作量。 要在C#中运用 SQLite也很基本,只要找一个C#的wrapper就可以了,例如,我运用的就是来自
  http://sqlite.phxsoftware.com/  的一个dll,System.Data.SQLite. 下载下来的文件是 ......

C# C/S程序出错:ContextSwitchDeadlock is detected

今天在VS2005调试一个C# C/S程序,当通过RFC与SAP连接时间过长时,出现此错误,在网上找到解决办法。
VS2008上的一个程序,通过Oracle.DataAccess.dll执行drop user
cascade操作,我在sqlplus执行此操作大约需要一分钟左右时间,当我在VS2008中debug启动此程序时,一直接收到
“ContextSwitchDeadlock is detected& ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号