Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

C#ÀûÓÃwinapi¶¨Î»¿Ø¼þλÖÃËã·¨

public struct RECT
{
      public int left;
      public int Top;
      public int Right;
      public int Bottom;
}
public static bool CenterMouseOn(int hwnd)
{
            int x=0;
            int y=0;
            int maxX=0;
            int maxY=0;
            RECT crect=new RECT();
            int gFound=0;
            GetDisplayResolution(ref maxX,ref maxY);
            gFound=GetWindowRect(hwnd,ref crect);
            x=crect.Left+((crect.Right-crect.Left)/2);
            y=crect.Top+((crect.Bottom-crect.Top)/2);
            if((x>=0&&x<=maxX)&&(y>=0&&y<=maxY))
            {
               MoveMouse(hwnd,x,y);
                return true;
            }
             return false;
}
public static void GetDisplayResolution(ref int pixelX,ref int pixelY)
{
   pixelX=GetSystemMetrics(SM_CXSCREEN);
   pixelY=GetSystemMetrics(SM_CYSCREEN);
}


Ïà¹ØÎĵµ£º

ÓÃC#ʵÏÖ½«HTMLÎļþת»»ÎªCHMÎļþ(ת)

ÕâЩÌìÒòΪ¹¤×÷ÐèÒª£¬Òª½«Ò»Ð©htmlÎļþת»»ÎªchmÎļþ£¬µ±È»ÊÇÐèÒªºÍ³ÌÐò½áºÏÔÚÒ»Æð¡£
ºóÀ´ÕÒµ½NDoc£¬ÀïÍ·ÓÐÒ»¶Î´úÂëÊÇÏà¹ØµÄ£¬ÓÚÊÇ¿ªÊ¼·ÖÎö´úÂ룬дÍêÖ®ºó£¬×ܽ᣺Ö÷ÒªÊÇÀûÓÃ΢ÈíµÄhhc.exeÀ´±àÒëhtmlÎļþ£¬³ÌÐòÐèÒª½«¾ßÌåµÄÊý¾ÝдÈëhhpºÍhhcÎļþ¡£
Ö÷Òª´úÂëÈçÏ£º
¸´ÖÆC#´úÂë±£´æ´úÂëpublic void CompileProject()
{ ......

C# winformÓë flash as µÄ½»»¥Í¨Ñ¶

Ò»¡¢»ù±¾Ô­Àí¼°¹ý³Ì
Flashͨ¹ýExternalInterfaceÀàÓëÈÝÆ÷Ó¦ÓóÌÐò½øÐÐͨÐÅ¡£Îª´Ë£¬ExternalInterfaceÀàÌṩÁ½¸ö¾²Ì¬ÊôÐÔºÍÁ½¸ö¾²Ì¬·½·¨¡£
ExternalInterface.call(“º¯ÊýÃû”£¬[²ÎÊý…])·½·¨Ö´ÐÐÈÝÆ÷Ó¦ÓóÌÐòµÄ´úÂ룬¸Ã·½·¨ÖÁÉÙÐèÒªÒ»¸ö×Ö·û´®²ÎÊýÀ´Ö¸¶¨Òªµ÷Óõĺ¯ÊýÃû£¬ÆäËüÈκβÎÊý½«×÷Ϊ²ÎÊý±»´«µÝ¸ø± ......

C#Öн«¿Ø¼þÊý¾Ýµ¼³öExcel

ÔÚasp.netÏîÄ¿ÖеÄÒ»¸ö°ÑÊý¾Ý µ¼³öExcel±í¸ñµÄСʼþÈçÏ£º
 protected void ibnOut_Click(object sender, ImageClickEventArgs e)//µ¼³öExcel°´Å¥µÄµã»÷ʼþ
        {
              GridView2.DataSource = dt ......

c# Îļþ´«Êä

send :
string path = "E:\\c#\\convey_file\\convey_file\\Form1.cs"; //Òª´«ÊäµÄÎļþ
TcpClient client = new TcpClient();
client.Connect(IPAddress.Parse("192.168.0.52"),9999);
FileStream file = new FileStream(path,FileMode.Open,FileAccess.Read); // ......

c# primer note I

------------------------
¡ï
Foreach £º
Óŵ㣺
1¡¢²»Óÿ¼ÂÇÊý×éÆðʼË÷ÒýÊǼ¸
int[] nArray = new int[100];
// Use "foreach" to loop array
foreach( int i in nArray )
2¡¢¶ÔÓÚ¶àάÊý×é²Ù×÷ÓÃforeach·Ç³£¼ò±ã
int[,] nVisited = new int[8,8];
// Use "for" to loop two-dimension array
for( int i = 0; i ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ