C#ÀûÓÃwinapi²¶×½Êó±ê²Ù×÷¿Ø¼þµÄ¾ä±ú
public struct POINTAPI
{
public int x;
public int y;
}
public static void GetWindowfromPoint(ref int hwnd,ref StringBuilder winText,ref StringBuilder clsName,ref StringBuilder pText)
{
int parentHandle=0;
int maxLen=128;
POINTAPI pnt = new POINTAPI();
parentHandle=GetCursorPos(ref pnt);
hwnd=WindowfromPoint(pnt.x,pnt.y);
winText =new StringBuilder(maxLen);
parentHandle=GetWindowText(hwnd,winText,maxLen);
clsName=new StringBuilder(maxLen);
parentHandle=GetClassName(hwnd,clsName,maxLen);
pText=new StringBuilder(maxLen);
parentHandle=GetParent(hwnd);
parentHandle=GetWindowText(parentHandle,pText,maxLen);
}
Ïà¹ØÎĵµ£º
C#ÕýÔò±í´ïʽ±à³Ì£¨¶þ£©£ºRegexÀàÓ÷¨
¶ÔÓÚÕýÔò±í´ïʽµÄÓ¦Ó㬻ù±¾ÉÏ¿ÉÒÔ·ÖΪÑéÖ¤¡¢ÌáÈ¡¡¢·Ö¸îºÍÌæ»»¡£½ö½öÀûÓÃRegexÀà¾Í¿ÉÒÔʵÏÖÑéÖ¤ºÍ¼òµ¥Ìæ»»¡£
ÀûÓÃRegexÀàʵÏÖÑéÖ¤
¾Àú2009ÄêµÄ±¸°¸ºÍDNSÍ£Ö¹½âÎö·ç²¨Ö®ºó£¬´ó²¿·ÖµÄ´øÓз´À¡ÐÔµÄÍøÕ¾ºÍÂÛ̳¶¼¶ÔһЩÃô¸Ð´Ê½øÐÐÁ˹ýÂË£¬°üº¬ÓÐÕâÀàÃô¸Ð´ÊµÄÎÄÕÂҪôÄÚÈ ......
ÔÚnetÖÐÓÐÒ»¸öÖÁ¹ØÖØÒªµÄ¹Ø¼ü×Ö£¬ÄǾÍÊÇusing
usingÒ»°ãÓÐ×ÅÒÔϼ¸ÖÖÓ÷¨£º
1¡¢Ö±½ÓÒýÈëÃüÃû¿Õ¼ä
a¡¢using System £¬Õâ¸öÊÇ×î³£Óõģ¬¾ÍÊÇusing+ÃüÃû¿Õ¼ä£¬ÕâÑù¾Í¿ÉÒÔÖ±½ÓʹÓÃÃüÃû¿Õ¼äÖеÄÀàÐÍ£¬¶øÃâÈ¥ÁËʹÓÃÏêϸµÄÃüÃû¿Õ¼ä
b¡¢Ê¹ÓÃÈ«ÏÞ¶¨Ãû
²»ÓÃʹÓÃusing System;Ö±½ÓÔÚ³ÌÐòÖе÷ÓÃSystem.Console.WriteLine("Hello ......
C#Windows·þÎñ³ÌÐòµÄ¿ìËÙ¿ª·¢ÏòÄã½éÉÜÁËÔںܶàÓ¦ÓÃÖÐÐèÒª×öwindows·þÎñÀ´²Ù×÷Êý¾Ý¿âµÈ²Ù×÷£¬Ï£Íû¶ÔÄãÁ˽âC#Windows·þÎñ³ÌÐòµÄ¿ª·¢ÓÐËù°ïÖú¡£
C#Windows·þÎñ³ÌÐòµÄ¿ìËÙ¿ª·¢£ºÔںܶàÓ¦ÓÃÖÐÐèÒª×öwindows·þÎñÀ´²Ù×÷Êý¾Ý¿âµÈ²Ù×÷£¬±ÈÈç
£¨1£©Ò»Ð©·Ç³£ÂýµÄÊý¾Ý¿â²Ù×÷£¬²»ÏëÒ»´ÎÐÔÈ¥×ö£¬ÏëÂýÂýµÄͨ¹ý·þÎñ¶¨Ê±È¥×ö£¬±ÈÈ綨ʱΪ ......
ÎÒÃÇ×öÁ˳ÌÐò£¬²»Ãâ»áÓа汾Éý¼¶£¬Õâ¾ÍÐèÒª³ÌÐòÓÐ×Ô¶¯°æ±¾Éý¼¶µÄ¹¦ÄÜ¡£
ÄÇô¿´¿´ÎÒÊÇÈçºÎʵÏÖ³ÌÐò×Ô¶¯¸üеġ£
Ö±½ÓÉÏ´úÂ룺
using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;
using System.IO;
using System.Net;
using System.Xml;
namespace ......