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

VB¶ÔINIÎļþ²Ù×÷

VB¶ÔINIÎļþ²Ù×÷
2009-02-25 00:17
INI ÎļþÊÇʲôÑù×Ó£¿——²»»á°É£¬Õⶼ²»ÖªµÀ¡£INI Îļþ¾ÍÊÇ Windows Öг£¼û
µÄÒÔ .ini ΪÀ©Õ¹ÃûµÄÎļþ£¬ÆäÄÚ²¿¸ñʽºÍ¸÷²¿·ÖµÄÃû³ÆÈçÏ£º
[Section1]
Key1=Value1
Key2=Value2
Key3=Vlaue3
[Section2]
Key1=Value1
Key2=Value5
Key4=Value4
Key5=...
...
     INI ÎļþÖзÖÈô¸É¸ö¶Î (Section)£¬Ã¿¸ö¶ÎÖÐÓÐÈô¸É¸ö¼ü (Key) Öµ (Value) ¶Ô
¡£Ò»¸ö¼üÖµ¶Ô±£´æÒ»¸öÐÅÏ¢£»¶ÎÔò½«ÊôÐÔÀàËƵÄһЩ¼üÖµ¶Ô×éÖ¯ÔÚÒ»Æð¡£Í¬Ò»¸ö¶ÎÖв»
ÄܳöÏÖÁ½´ÎÒÔÉÏͬÑùµÄ¼ü£¬µ«²»Í¬µÄ¶ÎÖпÉÒÔ³öÏÖÏàͬµÄ¼ü¡£
     ÏÖÔÚÃ÷°×ÁËÂð£¿ÒªÊÇ»¹²»Ã÷°×£¬¾Íµ½ Windows ÀïÕÒÁ½¸ö INI Îļþ¿´¿´£¬Îı¾±à¼­
Æ÷¾Í¿ÉÒÔ´ò¿ªµÄ¡£Ã÷°×ÁË INI Îļþ¾ÍÒª¿ªÊ¼Ñ§Ï°ÔõÑùÔÚ VB ÖжÁд INI ÁË¡£
     VB ¶Áд INI Îļþ£¬ÄÑÂ𣿲»ÄÑ£¬ÒòΪ Windows ÒѾ­ÎªÎÒÃÇ×öºÃÁËÒ»ÇУ¬ÎÒÃÇÖ»
ÐèÒªµ÷ÓÃËüµÄ API º¯Êý¾Í¿ÉÒÔÁË¡£ÎªÁ˶Áд INI Îļþ£¬ÎÒÃÇ¿ÉÄÜÓõ½ÒÔÏ API º¯Êý
£º
     GetPrivateProfileInt
     GetPrivateProfileString
     WritePrivateProfileString
     ÆäÖÐ WritePrivateProfileString ÊÇÓÃÀ´Ïò INI ÎļþдÐÅÏ¢µÄ£¬¶ø
GetPrivateProfileInt ºÍ GetPrivateProfileString ÔòÊÇÓÃÀ´´Ó INI ÎļþÖжÁÐÅÏ¢
µÄ£¬Ç°ÕßÓÃÓÚ¶ÁÈ¡ÕûÐÍÊý¾Ý£¬ºóÕßÔòÓÃÓÚ¶ÁÈ¡×Ö·û´®ÐÍÊý¾Ý¡£
     ÉÏÊöÈý¸ö API º¯ÊýÔÚ VB ÖеÄÉêÃ÷ºÍ˵Ã÷ÈçÏ£º
Private Declare Function GetPrivateProfileInt Lib "kernel32" _
Alias "GetPrivateProfileIntA" ( _        ' ·µ»ØËù¶ÁÈ¡µÄ³¤ÕûÐÍÖµ
     ByVal lpApplicationName As String, _     ' Òª¶ÁÈ¡µÄ¶Î (Section) Ãû³Æ
     ByVal lpKeyName As String, _             ' Òª¶ÁÈ¡µÄµÄ¼ü (Key) Ãû³Æ
     ByVal nDefault As Long, _                ' Ö¸¶¨Ä¬ÈÏÖµ£¬Èç¹û¶Áȡʱ³ö´í£¬
Ôò·µ»Ø¸ÃÖµ
     ByVal lpFileName As String) As Long  


Ïà¹ØÎĵµ£º

(ת)VBÖд´½¨¿ÉÒÔÊä³öº¯ÊýµÄDLL

VBÖд´½¨µÄDLLÖ»ÊÇCOM×é¼þ£¬ÎÞ·¨×÷ΪÊä³öº¯ÊýµÄDLL¡£½ñÌì´ÓÅóÓÑÄÄÀï¸ãµ½Ò»ÖÖ¿ÉÒÔ´´½¨Êä³öº¯ÊýµÄDLLµÄ·½·¨£¬ÐÀϲ֮Ó࣬²»¸Ò¶ÀÏí£¬ÏÖÔÚ°ÑËû½éÉܸø´ó¼Ò¡£
¡¡¡¡VB±àÒëÎļþʵ¼ÊÉϲÉÈ¡ÁËÁ½´Î±àÒëµÄ·½·¨£¬Ê×ÏÈÊǵ÷ÓÃc2.exe²úÉúOBJÎļþ£¬È»ºóµ÷ÓÃLink.exeÁ¬½Ó¡£Èç¹ûÔÚlinkµÄʱºòÌí¼ÓEXPORTÑ¡Ïʵ¼ÊÉÏÊÇ¿ÉÒÔÊä³öº¯ÊýµÄ¡£µ«ÊÇ£¬ÔÚV ......

[VB]»ñÈ¡SYSKEY

ºÜ¾ÃÒÔÇ°µÄÒ»¸ö´úÂëÁË¡£¡£¡£¡£¡£ÄÇʱ»¹³ÁÃÔÓÚÑо¿WindowsXPµÇ¼ÃÜÂëµÄ¼ÆËã·½·¨¡£¡£¡£¡£
ÏÈн¨Ò»¸öVB¹¤³Ì£¬»­Ò»¸öCommandButton£¬¸ÄÃûΪcmdGetSYSKEY£¬»­Ò»¸öTextBox£¬¸ÄÃûΪtxtSYSKEY£¬È»ºóÕ³ÌùÏÂÃæµÄ´úÂ룬ÔËÐм´¿É£¬ÔÚWindowsXP SP2 Build 2600 + VB6.0 SP6ϲâÊÔͨ¹ý£¬»ñµÃµÄSYSKEYÓëCain&Abel v4.9.6Ò»Ö¡£¡£¡£¡£ ......

ÖØÊ°VBÖ®¶þ£¬ºÁÃëƪ

ÖØÊ°VBÖ®¶þ£¬ºÁÃëƪ
PMP ¹Ø¾¢ËÉ
   
    ¹íʹÉñ²î£¬09Äê12ÔÂÈëÖ°µÄ¹«Ë¾ÈÔʹÓÃVB¿ª·¢Èí¼þ£¬ËäÈ»²¢·Çרְ¿ª·¢£¬µ«Ò²²»µÃ²»ÔÚʸô4ÄêÖ®ºó£¬ÖØÐÂʹÓÃVB¡£
    ÔÚvbÖÐÈçºÎ»ñµÃºÁÃ뾫¶È¼¶±ðµÄʱ¼ä£¿vbµÄʱ¼äº¯Êý²»Ö§³ÖºÁÃ룬ÐèÒªÀûÓÃwindowsµÄ»ù±¾API£¬±àд³ÌÐò²ÅÄÜ»ñÈ¡ºÁÃ뼶 ......

¡°×Ô¶¯µã»÷°´Å¥¡±Ð¡¹¤¾ßVBÔ´Âë

“×Ô¶¯µã»÷°´Å¥”С¹¤¾ßVBÔ´Âë
Option Explicit
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Const WM_LBUTTONDOWN = &H201
Private Const WM_LBUTTONUP = &H202
Pri ......

VB³õ¼¶ÄæÏòÓëÀûÓÃ

½ñÌì×öÒ»¸öVB³ÌÐòµÄ×ÔÏÔ×¢²áÂë¡£ÎÒÒ²²»ÖªµÀ¸ÃÔõô½Ð£¬¾ÍÊÇÕÒµ½³öÏÖ×¢²áÂëµÄµØ·½£¬È»ºóÓöԻ°¿òµ¯³öÀ´¡£Ëµ°×Á˾ÍÊÇÓÃMessageBox°ÑÒ»¸ö×Ö·û´®¸øµ¯³öÀ´£¨Ã»×·Ç󰢡£¡£¡££©
    ÎªÁËÓеã×·Ç󣬽ñÌì²»µ¼Èëuser32ÀïÃæµÄAPI£¬¶øÊÇ°ÑVBÀïÃæ×Ô´øµÄMsgboxº¯Êý¸øÍÚ³öÀ´µ÷Ó㬾ÍÊÇÒýÓÃMSVBVM60.rtcMsgBoxº¯Êý¡£ÎÒÊ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ