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

Delphi²Ù×÷×¢²á±íµÄÒ»°ã²½Öè

Delphi²Ù×÷×¢²á±í²½ÖèÈçÏ£º
-------------------------------------
1£©ÔÚUsesÖÐÌí¼ÓRegistryµ¥Ôª£»
2£©ÉùÃ÷TRegistry¶ÔÏó£»
3£©´´½¨TRegistry¶ÔÏó£»
4£©Ö¸¶¨¸ù¼ü£»
----------------try------------------
5£©´ò¿ªÐèÒª²Ù×÷µÄÖ÷¼ü£»
6£©¶Áд²Ù×÷£»
7£©±£´æ²¢¹Ø±ÕÖ÷¼ü£»
--------------finally----------------
8£©ÊÍ·ÅTRegistry¶ÔÏó£»
---------------end------------------
==========================================================
Uses Registry;    //Ìí¼ÓRegistryµ¥Ôª£»
var
    MyReg: TRegistry;    //ÉùÃ÷TRegistry¶ÔÏó£»
begin
    MyReg := TRegistry.Create;   //´´½¨TRegistry¶ÔÏó£»
    try
        MyReg.RootKey := HKEY_LOCAL_MACHINE; //Ö¸¶¨¸ù¼ü£»
        if MyReg.OpenKey('Ö÷¼üÃû', true) then  //´ò¿ªÐèÒª²Ù×÷µÄÖ÷¼ü£»
        begin
            MyReg.ReadType(---);   //¶Á×¢²á±íÎļþ
            MyReg.WriteType(---);   //дע²á±íÎļþ
        end;
        MyReg.CloseKey;   //±£´æ²¢¹Ø±ÕÖ÷¼ü£»
    finally
        MyReg.Free;    //ÊÍ·ÅTRegistry¶ÔÏó£»
    end;
end;
==========================================================
function OpenKey(const Key:String; CanCreate:Boolean):Boolean;
//µÚ¶þ¸ö²ÎÊýÖ¸Ã÷£¬Èç¹ûÐèÒª´ò¿ªµÄÖ÷¼ü²»´æÔÚʱÊÇ·ñ´´½¨¸ÃÖ÷¼ü
function CreateKey(const Key:String):Boolean;
//´Ë·½·¨ÓÃÓÚ´´½¨Ö÷¼ü£¬Êµ¼ÊÉϲ¢²»³£ÓÃ
function KeyExists(const Key:String):Boolean;
//ÅжÏÖ÷¼üÊÇ·ñ´æÔÚ
(***¶ÔÓÚ×Ö·û´®ÀàÐ͵IJÙ×÷º¯Êý***)
function ReadString(const Name: String):String;
procedure WriteString(const Name, Value: String);
//¶ÔÓÚÆäËüÊý¾ÝÀàÐ͵Ä×¢²á±í¶Áд


Ïà¹ØÎĵµ£º

Delphi ÖÐÈçºÎ°²×°×é¼þ?


Delphi ÖÐÈçºÎ°²×°×é¼þ?
delphiÖÐÈçºÎ°²×°×é¼þÓÐÎåÖÖÇé¿ö£º
1¡¢Ö»ÓÐÒ»¸öDCUÎļþµÄ×é¼þ¡£DCUÎļþÊDZàÒëºÃµÄµ¥ÔªÎļþ£¬ÕâÑùµÄ×é¼þÊÇ×÷Õß²»Ïë°ÑÔ´Â빫²¼¡£Ò»°ãÀ´Ëµ£¬×÷Õß±ØÐë˵Ã÷´Ë×é¼þÊʺÏDelphiµÄÄÄÖÖ°æ±¾£¬Èç¹û°æ±¾²»¶Ô£¬ÔÚ°²×°Ê±¾Í»á³öÏÖ´íÎó¡£Ò²ÕýÊÇÒòΪûÓÐÔ´Â룬¸øʹÓÃÕß´øÀ´Á˲»±ã£¬ÄǾÍÊÇÒ»µ©Delphi°æ±¾Éý¼¶£¬´Ë× ......

delphiÈý²ã¼Ü¹¹

Èý²ã¼Ü¹¹Ö¸µÄÊǽçÃ棬ҵÎñÂß¼­ºÍÊý¾Ý´æ´¢·ÖÀë,²»ÊÇÖ¸ÎïÀíÉÏÊÇ·ñ·ÖÀë¡£
ÕâÑù×öµÄºÃ´¦ÊDzã´Î·ÖÃ÷£¬Î¬»¤ºÃ×ö£¬ÏµÍ³×ÊÔ´Ò²ºÃ·Ö²¼Ê½´¦Àí¡£
Êý¾Ý¿â²ãÄľͲ»ËµÁË£¬ÓÃMSSQL¡¢OrcaleËæÄãÁË£¬¾ÍÊÇÊý¾Ý·þÎñ²ã
ÒµÎñÂß¼­µÄ»°Òª·ÖÎöÇå³þ£¬¾ÍÊÇÖмä²ã
½çÃ棬Ҳ½Ð¿Í»§¶Ë¡£ÕâÀï¾ÍÊǵõ½Êý¾ÝºÍÏÔʾÊý¾ÝµÄ²¿·ÖÁË£¬²»×öÆäËü´¦Àí¡£µ«ÊÇÊý¾ÝÓÐ ......

Delphi¶àÏß³Ìѧϰ£º¶àÏß³ÌÊý¾Ý¿â²éѯ£¨ADO£©

ADO¶àÏß³ÌÊý¾Ý¿â²éѯͨ³£»á³öÏÖ3¸öÎÊÌ⣺
1¡¢CoInitialize ûÓе÷ÓÃ
£¨CoInitialize was not
called£©£»ËùÒÔ£¬ÔÚʹÓÃÈκÎdbGo¶ÔÏóÇ°£¬±ØÐëÊÖ
µ÷ÓÃCoInitializeºÍCoUninitialize¡£µ÷ÓÃCoInitializeʧ°Ü»á²úÉú"CoInitialize was not
called"ÀýÍâ¡£
2¡¢»­²¼²»ÔÊÐí»æ»­
£¨Canvas does not allow
drawing£ ......

DELPHIÓû§µÇ¼·½°¸

3.2  Óû§µÇ¼·½°¸
ÔÚ½øÈëÒ»¸öϵͳʱ£¬±ØÐëÏÈÔڵǼ´°ÌåÖÐÊäÈëÕýÈ·µÄÓû§ÃûºÍÃÜÂë²ÅÄܽøÈë¡£ÕâÑù¿ÉÒÔÈ·±£ÏµÍ³µÄ°²È«ÐԺͱ£ÃÜÐÔ£¬µÇ¼´°ÌåµÄÖÆ×÷°´ÕÕϵͳµÄ´óС¼°Óô¦£¬¿ÉÒÔ·ÖΪ²»Í¬µÄµÇ¼´°ÌåÑùʽ£¬ÔÚϵͳµÚÒ»´ÎµÇ¼ǰ£¬Ê×ÏÈÒª¶Ô²Ù×÷Ô±ÐÅÏ¢½øÐÐÏàÓ¦µÄÉèÖᣱ¾½Ú½«¶ÔµÇ¼´°Ìå¼°²Ù×÷Ô±¹ÜÀí´°ÌåµÄÖÆ×÷¹ý³Ì½øÐÐÏêϸµÄ˵Ã÷ ......

DELPHIÓû§µÇ¼·½°¸

3.2  Óû§µÇ¼·½°¸
ÔÚ½øÈëÒ»¸öϵͳʱ£¬±ØÐëÏÈÔڵǼ´°ÌåÖÐÊäÈëÕýÈ·µÄÓû§ÃûºÍÃÜÂë²ÅÄܽøÈë¡£ÕâÑù¿ÉÒÔÈ·±£ÏµÍ³µÄ°²È«ÐԺͱ£ÃÜÐÔ£¬µÇ¼´°ÌåµÄÖÆ×÷°´ÕÕϵͳµÄ´óС¼°Óô¦£¬¿ÉÒÔ·ÖΪ²»Í¬µÄµÇ¼´°ÌåÑùʽ£¬ÔÚϵͳµÚÒ»´ÎµÇ¼ǰ£¬Ê×ÏÈÒª¶Ô²Ù×÷Ô±ÐÅÏ¢½øÐÐÏàÓ¦µÄÉèÖᣱ¾½Ú½«¶ÔµÇ¼´°Ìå¼°²Ù×÷Ô±¹ÜÀí´°ÌåµÄÖÆ×÷¹ý³Ì½øÐÐÏêϸµÄ˵Ã÷ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ