易截截图软件、单文件、免安装、纯绿色、仅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#中用XmlTextReader对象操作XML文件

sd.xml文件:
<?xml version="1.0" encoding="gb2312"?>
<!--这是一个xml文件-->
<xml1>
  <item name="1">第一个item</item>
  <item name="2">
      <item name="1">这个结点(1) ......

C#一次连接数据库执行多条sql语句(三种方法)

第一种方法:
            string str="server=.;uid=sa;pwd=111111;database=text_db";//连接字符串
            SqlConnection SCON = null;//连接对象
       &n ......

Asp.NET XMLHTTP获取网页内容C#版

首先需要在项目中添加(Microsoft XML, v3.0)的引用
using MSXML2;
private string VerifyNotifyURL(string URL)
{
    MSXML2.XMLHTTPClass xmlhttp=new MSXML2.XMLHTTPClass();
    try
    {
    &nbs ......

“ASP.NET(C#)Fans” QQ群:96877690

---------------------------------------
Asp.Net,C#,SQL,JS,WCF,AJAX,工作流,WPF,MVC,LINQ,设计模式(架构)等技术讨论
“ASP.NET(C#)Fans” QQ群:96877690
---------------------------------------
不管是J2SE、J2EE还是J2ME敬请加入!Eclipse、NetBeans
Java交流QQ高级群扩招:96878255  ......

C#与Flash交互

C#与Flash交互 (转自小磊在线)
C#与Flash交互
前段日子公司要求做一个C#与Flash交互的东西,用来C#与短信猫通讯将数据传到Flash上显示与操作的应用。
第一步C#添加组件
打开VS2005-工具-选择工具箱项-COM组件-选择Shockwave Flash Object-确定
添加好组件往场景上拖放,如果提示注册需求注册
c# 注册控件-在运行输 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号