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

Delphi¶àÏß³Ìѧϰ(8)£ºÓÅÏȼ¶

Ò»¸öÏ̵߳ÄÓÅÏȼ¶È¡¾öÓÚ´´½¨Ï̵߳Ľø³ÌµÄÓÅÏȼ¶£¨priority class£©ºÍÏ̱߳¾ÉíÏà¶ÔµÄÓÅÏȼ¶£¨relative priority£©¡£
    1¡¢½ø³ÌÓÅÏȼ¶£º
    ²»Í¬²Ù×÷ϵͳ ÓÅÏȼ¶ÊýÄ¿²»Í¬¡£Windows2000ÒÔÉϵİ汾ÁбíÈçÏ£º
Idle£º£¨±êÖ¾£ºIDLE_PRIORITY_CLASS£¬ÖµÎª$40£©£»
Below Normal£º£¨±êÖ¾£ºBELOW_NORMAL_PRIORITY_CLASS£¬ÖµÎª$4000£©£»
Normal£º£¨±êÖ¾£ºNORMAL_PRIORITY_CLASS£¬ÖµÎª$20£©£»
Above Normal£º£¨±êÖ¾£ºABOVE_NORMAL_PRIORITY_CLASS£¬ÖµÎª$8000£©£»
High£º£¨±êÖ¾£ºHIGH_PRIORITY_CLASS£¬ÖµÎª$80£©£»
Realtime£º£¨±êÖ¾£ºREALTIME_PRIORITY_CLASS£¬ÖµÎª$100£©¡£
½ø³ÌµÄȱʡÓÅÏȼ¶ÎªNormal£¬¼¸ºõËùÓг¡ºÏ¶¼²»Ó¦½«ÓÅÏȼ¶ÉèΪRealtime¡£
´´½¨½ø³Ìʱ¸ø¶¨ÓÅÏȼ¶£¬Ö»ÒªÔÚCreateProcessÖУ¬½«ÓÅÏȼ¶±êÖ¾×ö“OR”²Ù×÷£¬ÌîÈëdwCreationFlags²ÎÊýÖС£
È¡µÃ»î¶¯½ø³ÌµÄÓÅÏȼ¶£º
   function GetPriorityClass(hProcess:THandle):DWORD;stdcall;
ÉèÖû½ø³ÌµÄÓÅÏȼ¶£º
   function SetPriorityClass(hProcess:THandle;dwPriorityClass:DWORD);BOOL;
£¨ÉÏÃæÁ½¸öº¯ÊýµÄhProcessÓÉGetCurrentProcessº¯Êý»ñµÃ£¬Õâ¸ö¾ä±ú²»ÓÃCloseHandle¹Ø±Õ£©
    2¡¢Ïß³ÌÏà¶ÔÓÅÏȼ¶£º
    Ïß³ÌÓÅÏȼ¶·Ö7À࣬ÈçÏ£º
tpIdle£º£¨³£Á¿£ºTHREAD_PRIORITY_IDLE£¬ÖµÎª-15£©£»
tpLowest£º£¨³£Á¿£ºTHREAD_PRIORITY_LOWEST£¬ÖµÎª-2£©£»
tpBelow Normal£º£¨³£Á¿£ºTHREAD_PRIORITY_BELOW_NORMAL£¬ÖµÎª-1£©£»
tpNormal£º£¨³£Á¿£ºTHREAD_PRIORITY_NORMAL£¬ÖµÎª0£©£»
tpAbove Normal£º£¨³£Á¿£ºTHREAD_PRIORITY_ABOVE_NORMAL£¬ÖµÎª1£©£»
tpHighest£º£¨³£Á¿£ºTHREAD_PRIORITY_HIGEST£¬ÖµÎª2£©£»
tpTimeCritical£º£¨³£Á¿£ºTHREAD_PRIORITY_TIME_CRITICAL£¬ÖµÎª15£©£»
¶ÔÓÚÏß³ÌÀàTThread£¬¸Ä±äÏß³ÌÓÅÏȼ¶·Ç³£·½±ã£¬Ö»Òª½«ÅÉÉúÀàµÄPriorityÊôÐÔÏàÓ¦ÉèÖþͺÃÁË¡£È磺MyThread.Priority:=tpHighest;
  3¡¢Ïß³ÌÓÅÏȼ¶¼ÆË㣺
     Èç¹ûÏß³ÌÓÅÏȼ¶ÎªtpIdle£¬ÎÞÂÛËüËù´¦µÄ½ø³ÌÓÅÏȼ¶ÊǶàÉÙ£¬Ïß³ÌÕûÌåÓÅÏȼ¶×ÜÊÇ1£¬µ«ÊÇ£¬µ±½ø³ÌÓÅÏȼ¶ÎªRealtimeʱ£¬ÄÇôÓëtpIdleÏà×éºÏ£¬Ïß³ÌÕûÌåÓÅÏȼ¶Îª16£»
     Èç¹ûÏß³ÌÓÅÏȼ¶ÎªtpTimeCritical£¬ÎÞÂÛËüËù´¦µÄ½ø³ÌÓÅÏȼ¶Îª¶àÉÙ£¬ÕûÌåÓÅÏÈ×é¶¼ÊÇ15£¬µ«ÊÇ£¬µ±½ø³ÌÓÅÏȼ¶ÊÇRealtimeʱ£¬ÄÇÓëtpTim


Ïà¹ØÎĵµ£º

SDL & Object Pascal (Delphi) [3] ÖÆ×÷Ò»¸öÑ¡µ¥


Ò»¸öÑ¡µ¥´óÖÂÊÇÕâÑù£º
1.¿ÉÒÔ±»ÒÔijÖÖÐÎʽºô½Ð³öÀ´£¬Èç°´ÏÂesc£»
2.ÔÚÕâ¸öÑ¡µ¥Öй¦ÄܼüÓв»Í¬µÄ¶¨Ò壬ÈçÔ­±¾·½Ïò¼ü¿ØÖÆ×ß·£¬µ«ÏÖÔÚ¸ÄΪ¿ØÖƹâ±êµÄλÖã»
3.°´ÏÂÈ·¶¨¼üºóÓжÔÓ¦¹¦Äܱ»Ö´ÐУ»
4.¿ÉÒÔ±»¹Ø±Õ¡£
ÄÇôÎҵİ취ÊDZàдÁ½¸ö×ӳ̣¬ÆäÖÐÒ»¸ö´¦ÀíÑ¡µ¥ÖеÄʼþ£¬ÁíÍâÒ»¸öרߺÔð»­Ñ¡µ¥¡£
ÔÚ´Ó²½ÐÐÇл»µ½Ñ¡µ¥ ......

ÓÃSPCOMM ÔÚ DelphiÖÐʵÏÖ´®¿ÚͨѶ

ÓÃDelphi ʵÏÖ´®¿ÚͨѶ£¬³£Óõļ¸ÖÖ·½·¨Îª£ºÊ¹ÓÿؼþÈçMSCOMMºÍSPCOMM£¬Ê¹ÓÃAPIº¯Êý»òÕßÔÚDelphi Öе÷ÓÃÆäËü´®¿ÚͨѶ³ÌÐò¡£ÀûÓÃAPI±àд´®¿ÚͨÐųÌÐò½ÏΪ¸´ÔÓ£¬ÐèÒªÕÆÎÕ´óÁ¿Í¨ÐÅ֪ʶ£¬ÆäÓŵãÊÇ¿ÉʵÏֵŦÄܸüÇ¿´ó£¬Ó¦ÓÃÃæ¸ü¹ã·º£¬¸üÊʺÏÓÚ±àд½ÏΪ¸´ÔÓ µÄµÍ²ã´ÎͨÐųÌÐò¡£Ïà±È½Ï¶øÑÔ£¬ÀûÓÃSPComm¿Ø¼þÔòÏà¶Ô½Ï¼òµ¥£¬¸Ã¿Ø¼þ¾ßÓ ......

Delphi ×Ô¼ºÐ´¸öTimerÍæÍæ

¼¼Êõ½»Á÷,DH½²½â.
Ã÷ÌìÈ¥×ø»ð³µ,»Ø¼Ò,½ñÌì¾ÍûÓÐÊÂ×ö,±¾À´ÔÚŪһ¸ö¿ç½ø³Ì»ñÈ¡ÆäËû³ÌÐòÀïÃæ×é¼þ,ÈçListView,ListBox,ButtonµÈµÄÐÅÏ¢,ͻȻÓиöÏë·¨×Ô¼ºÐ´¸öTimer,²»ÓÃSetTimerº¯Êý,ÎÒÃÇ×Ô¼ºÓøö¶àÏß³ÌÒ²ÕýºÃʵÏÖÕâ¸ö.·´Õýǰ¶Îʱ¼ä¶àÏß³ÌҲŪµÃ±È½Ï¶à,±¾À´Ïëµ¥¶À½²½²µÄ,ÏÖÔÚ¾ÍÓøöÀý×ÓÀ´ËµÃ÷°É.
д³ÉÒ»¸ö¿Ø¼þ:utTimer.pas
v ......

delphi ¿ì½Ý¼üµÄʹÓÃ

CTRL+SPACE ´úÂ벹ȫ£¬ºÜºÃÓõÄ(ÏȸÄÁËÊäÈë·¨Èȼü)
CTRL+SHIFT+C ±àдÉêÃ÷»òÕß²¹ÉϺ¯Êý
CTRL+SHIFT+↑(↓) ÔÚ¹ý³Ì¡¢º¯Êý¡¢Ê¼þÄÚ²¿, ¿ÉÌøÔ¾µ½ÏàÓ¦µÄ¹ý³Ì¡¢º¯Êý¡¢Ê¼þµÄ¶¨Ò壨ÔÚINTERFACEºÍIMPLEMENTATIONÖ®¼äÀ´»ØÇл»£©
CTRL+SHIFT+G ²åÈëGUID
CTRL+J (µ¯³öDELPHIÓï¾äÌáʾ´°¿Ú£¬Ñ¡ÔñËùÐèÓï¾ä½«×Ô¶¯Íê³ÉÒ»Ìõ ......

¹ØÓÚdelphi Assigned

¹ØÓÚdelphi Assigned
1.¸ù¾Ý Delphi Ö¸Áî²Î¿¼ÊÖ²áÖÐ
˵Ã÷£º
Assigned º¯Ê½ÔÚ²ÎÊý²»Îªnilʱ´«»ØTrue,±íʾָÕëÒѾ­Ö¸µ½Ä³¸öÄÚ´æµØÖ·£¬Õâ¸öÄÚ´æµØÖ·¿ÉÄÜÊÇÒ»¸ö¶ÔÏóµØÊ×µØÖ·£¬Ò²¿ÉÄÜÔÚº¯Êý»ò¹ý³ÌÖУ¬ÉùÃ÷Ò»¸öÖ¸Õë±äÁ¿£¬Ã»Óи³ÖµÎªnil £¬ÎÞÂÒµÄÖ¸Ïòij´¦£¬ÕâÁ½¸öÖÖÇé¿ö£¬Assigned£¨Ö¸Õë±äÁ¿£©¶¼²»Îªnil , º¯Êý·Å»ØTrue£»
¶ø² ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ