c#ÀûÓÃwinapi±éÀú×ÀÃæ¿Ø¼þËã·¨
public enum GUIInfoType
{
guiText.
guiTextClass,
guiTextParent,
guiTextClassParent,
}
private static int level=0
public static int FindGUILike(ref int hWndArray,int hWndStart,ref string windowText,ref string className,ref string parentText)
{
int hwnd=0;
int r=0;
StringBuilder sWindowText=new StringBuilder();
StringBuilder sClassname=new StringBuilder();
StringBuilder sParentText=new StringBuilder();
if(level==0)
{
hWndTarget=0;
if(hWndTarget==0) hWndStart = GetDesktopWindow();
}
level=level+1;
hwnd=GetWindow(hWndStart,GW_CHILD);
while(hwnd!=0)
{
r=FindGUILike(ref hWndArray,hwnd windowText,ref classname,ref parentText);
sWindowText.Capacity=255;
r=GetClassName(hwnd,sWindowsText,255);
sClassname.Capacity=255;
r=GetWindowText(GetParent(hwnd),sParentText,225);
GUIInfoType guiInfoType=GetGUIInfoType(windowText,className,parentText);
ResetGUIInfo(guiInfoType,hwnd,ref hWndArray,ref windowText,ref className,ref parentText,sWindowText,sClassname,sParentText);
hwnd=GetWindow(hwnd,GW_HWNDNEXT);
}
level=level-1;
return 0;
}
private static GUIInfoType GetGUIInfoType(string winText,string winClass,string winTextParent)
{
if(winText!=''&&winClass!=''&winTextParent=='')
return GUIInfoType.guiTextClass;
else if(winText!=''&&winClass==''&winTextParent!='')
return GUIInfoType.guiTextParent;
else if(winText!=''&&winClass!=''&winTextParent=='')
return GUIInfoType.guiClassParent;
return GUIInfoType.guiText;
}
private static void ResetGUIInfo(GUIInfoType guiInfoType,int hwnd,ref int hWndTarget,ref string windowText,ref string className,ref string parentText,StringBuilder sParentText)
{
string clsStartedWith='';
if(clas
Ïà¹ØÎĵµ£º
1¡¢C/C++³ÌÐòÔ±Çë×¢Ò⣬²»ÄÜÔÚcaseÓï¾ä²»Îª¿Õʱ“ÏòÏÂÖ´ÐД¡£
¡¡¡¡2¡¢ÖµÀàÐͺÍÒýÓÃÀàÐÍÖ®¼äµÄÇø±ð£ºC#µÄ»ù±¾ÀàÐÍ(int£¬charµÈ)¶¼ÊÇÖµÀàÐÍ£¬ÊÇÔÚÕ»Öд´½¨µÄ¡£¶ø¶ÔÏóÊÇÒýÓÃÀàÐÍ£¬´´½¨ÓÚ¶ÑÖУ¬ÐèҪʹÓùؼü×Önew¡£
¡¡¡¡3¡¢ÔÚC#ÖÐͨ¹ýʵÀý·ÃÎʾ²Ì¬·½·¨»ò³ÉÔ±±äÁ¿ÊDz»ºÏ·¨µÄ£¬»áÉú³É±àÒëÆ÷´íÎó¡£µ«ÊÇÎÒÃÇ¿ÉÒÔͨ¹ýÉù ......
һֱûÓÐÕÒµ½Ò»Öֺõķ½·¨À´ÒýÓÃÓзµ»ØÖµµÄ´æ´¢¹ý³ÌµÄ·½·¨£¬Ê¹ÎÒÔÚÌí¼ÓÊý¾ÝÖÐ×ßÁ˲»ÉÙµÄÍä·£¬×î½ü£¬ÔÚ²éÔÄÁË´óÁ¿µÄ×ÊÁÏÖ®ºó£¬ÖÕÓÚÔÚ΢ÈíµÄÒ»¸öʵÀýÖÐÕÒµ½ÁËÒ»ÖÖÁ¼ºÃµÄ·½·¨¡£
Ê×ÏȱàдºÃÒ»Óзµ»ØÖµµÄ´æ´¢¹ý³Ì
create procedure proc_name
@para1 nchar(20), --ÊäÈë²ÎÊý
@ ......
private void Create_Pz(string Sourcename)
{
string OutMsg;
SqlParameter[] sortPara = { new SqlParameter("@ps_IsType", Pz ......
C#ÕýÔò±í´ïʽ±à³Ì£¨Èý£©£ºMatchÀàºÍGroupÀàÓ÷¨ ÊÕ²Ø ´ËÎÄÓÚ2010-03-09±»ÍƼöµ½CSDNÊ×Ò³
ÈçºÎ±»ÍƼö£¿
Ç°ÃæÁ½Æª½²ÊöÁËÕýÔò±í´ïʽµÄ»ù´¡ºÍһЩ¼òµ¥µÄÀý×Ó£¬ÕâÆª½«ÉÔ΢ÉîÈëÒ»µã̽ÌÖÒ»ÏÂÕýÔò±í´ïʽ·Ö×飬ÔÚ.NETÖÐÕýÔò±í´ïʽ·Ö×éÊÇÓÃMathÀàÀ´´ú±íµÄ¡£
Ê×ÏÈÏÈ¿´Ò»¶Î´úÂ룺
view plaincopy to clipboardprint?
/// &l ......
Ò»¡¢³éÏóÀࣺ
³éÏóÀàÊÇÌØÊâµÄÀֻ࣬ÊDz»Äܱ»ÊµÀý»¯£»³ý´ËÒÔÍ⣬¾ßÓÐÀàµÄÆäËûÌØÐÔ£»ÖØÒªµÄÊdzéÏóÀà¿ÉÒÔ°üÀ¨³éÏó·½·¨£¬ÕâÊÇÆÕͨÀàËù²»Äܵġ£³éÏó·½·¨Ö»ÄÜÉùÃ÷ÓÚ³éÏóÀàÖУ¬ÇÒ²»°üº¬ÈκÎʵÏÖ£¬ÅÉÉúÀà±ØÐ븲¸ÇËüÃÇ¡£ÁíÍ⣬³éÏóÀà¿ÉÒÔÅÉÉú×ÔÒ»¸ö³éÏóÀ ......