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

VBÖÐ×Ö·û´®Æ¥ÅäµÄ¶àÖÖ·½Ê½

   Õâ¶Îʱ¼äÔÚÒÆÖ²ÏîÄ¿µÄ¹ý³ÌÖУ¬Æð³õÎÒÏëÅжÏÒ»¸ö×Ö·û´®ÖÐÊÇ·ñ´æÔÚij×Ö·û£¨´®£©£¬Ö±½ÓµÄʹÓ÷½·¨ÊÇÓÃinstr£¨start£¬string1£¬string2£¬VB compare£©£¬µ«¾­¹ý·ÖÎöÔÚVBÖпÉÒÔÖ»ÓÃһϷ½·¨À´Åжϣ¡
   1.³£ÓõÄINStr·½·¨
    Function InStr([Start], [String1], [String2], [Compare As VbCompareMethod = vbBinaryCompare])
VBA.Strings µÄ³ÉÔ±
·µ»ØÔÚÁíÒ»×Ö·û´®ÖеÚÒ»´Î³öÏÖijһ×Ö·û´®µÄλÖÃ

   ÅжÏstring1ÖдÓstart¿ªÊ¼µÄλÖõÚÒ»´Î³öÏÖstring2µÄλÖÃ
 
2.ʹÓÃÕýÔò±í´ïʽ
   ÔÚVBÖÐÐèÒªÒýÈëLibrary VBScript_RegExp_55
   Î»ÖÃÔÚC:\WINDOWS\System32\vbscript.dll\3
    Microsoft VBScript Regular Expressions 5.5
   µ±È»£¬Äã¿ÉÒÔÖ±½ÓÔÚÏîÄ¿ÖÐÒýÓã¬Ê¹Ó÷½·¨ÈçÏ£º
Dim ResultString As String
Dim myRegExp As RegExp
Dim resultCollection As MatchCollection
Const pattern As String = "^\s*Dim\s+([\w|,|\s]+)(?:\s+As\s+Recordset)"
Public Function executes(SubjectString As String, result As MatchCollection)
Set myRegExp = New RegExp
myRegExp.MultiLine = True
myRegExp.Global = True
myRegExp.pattern = pattern
Set result = myRegExp.Execute(Trim(SubjectString))
End Function

 
3.µÚÈýÖÖÊDZȽÏÌØ±ðµÄ·½·¨£¬ÊDzÉÓÃif string like [parttern]£¬¼´stringÐèÒªÂú×ãpartternÖеÄģʽ£¬²Å»á·µ»Øtrue£¬Æä¾ßÌ嶨ÒåÈçÏ£º
Óï·¨   
    
  result   =   string   Like   pattern   
    
  Like   ÔËËã·ûµÄÓï·¨¾ßÓÐÒÔϼ¸¸ö²¿·Ö£º   
    
  ²¿·Ö   ÃèÊö     
  result   ±ØÐèµÄ£»ÈκÎÊýÖµ±äÁ¿¡£     
  string   ±ØÐèµÄ£»ÈκÎ×Ö·û´®±í´ïʽ¡£     
  pattern   ±ØÐèµÄ£»ÈκÎ×Ö·û´®±í´ïʽ£¬×ñÑ­“˵Ã÷”ÖеÄģʽƥÅäÔ¼¶¨¡£     
    
    
  ˵Ã÷   
    
  Èç¹û   string   Óë   pattern   Æ¥Å䣬Ôò   result   Ϊ  


Ïà¹ØÎĵµ£º

VB ²éÕÒÓÎÏ·´°¿Ú¾ä±úµÄ·½·¨


VB ²éÕÒÓÎÏ·´°¿Ú¾ä±úµÄ·½·¨
ÐÅÏ¢À´Ô´£ººÚ¿Í´úÂë ±à¼­£ºroot ä¯ÀÀ´ÎÊý£º191 ¼ÓÈëʱ¼ä£º2010-3-20 1:40:47 ÆÀÂÛ(0)
[ÎÊÌâÒ»,²»ÄÜ»ñµÃ´°¿Ú¾ä±ú]
Ò»°ãѰÕÒ´°¿Ú¾ä±ú¶¼ÊÇÖ±½ÓFindWindow°É,ÕâÑùÊDz»ÐеÄ,QQÈý¹úÔÚÕâЩº¯ÊýÉÏ×öÁËһЩ´¦Àí.ÎÒÀ´¸ø´ó¼Ò˵¸öÍòÄܵķ½·¨°É,
¶ÔÓÚGetWindowText·½·¨ÓÎÏ·¾Í¹Ü²»µ½ÁË,¿ÉÒÔÅäºÏʹÓÃGetW ......

VB´´½¨ACCESSÊý¾Ý¿âÈ«½â

VB´´½¨ACCESSÊý¾Ý¿âÈ«½â ¶¯Ì¬´´½¨Êý¾Ý¿â¡¢´´½¨±í£¬´´½¨¼Ç¼ ADO¡¢ADOX2009Äê04ÔÂ20ÈÕ ÐÇÆÚÒ» 10:17ÕªÒª£º ±¾ÎIJûÊöÁËÔÚVB³ÌÐòÖÐÀûÓÃADO¶ÔÏó¶¯Ì¬´´½¨Êý¾Ý¿âºÍÊý¾Ý±íµÄ·½·¨£¬ÕâЩ·½·¨ÔÚ¿ª·¢VBÊý¾Ý¿âÓ¦ÓóÌÐòÖкÜÓÐʵÓüÛÖµ£¬Ëü¿ÉÒÔÌá¸ßÊý¾Ý¿â³ÌÐòÁé»îÐÔ¡£
¡¡¡¡¹Ø¼ü´Ê£ºÊý¾Ý¿â¡¢Êý¾Ý±í¡¢ADO¡¢ADOX
¡¡¡¡1: ÎÊÌâµÄÌá³ö
¡¡¡¡Ô ......

VB ʹÓÃCÓïÑÔEscapeµÄ·½·¨

ÔÚCÓïÑÔÖУ¬escapeµÄ·ûºÅºÜºÃÓã¬
±ÈÈç
 "ÖйúÒ»¶¨Ç¿"
Õâ¸ö×Ö´®¿ÉÒÔд³É£º
"\x4E2D\x56FD\x4E00\x5B9A\x5F3A"
ÓÃ×ÖÔª±àÂë±àд³ÌÐò£¬ÔÚÆäËû²»Í¬ÓïÑÔµÄwindowsÔË×÷ʱ£¬±È½Ï²»»áÓÐÎÊÌâ¡£
£¨ÎÒ¾¡Á¿²»ÏëÔÚ³ÌÐòÖÐдÈëÖÐÎÄ£©
µ«ÊÇvbÈç¹ûÈ«²¿ÒªÓÃ×ÖÔª±àÂëдµÄ»°£¬¾Í»áºÜÂé·³¶øÇÒÒ»¸öÒ»¸ö¶¼ÒªÊÖд³É£º
ChrW(&H4E2D) ......

VBµ÷ÓÃVC DLL Ô¼¶¨´íÎó,Çó¸ßÊÖÖ¸µã

VCº¯ÊýÊÇ:extern "C" int __declspec(dllexport)PassPortRead(char *InPutData,char OuPutData[255]);
VBÉùÃ÷ÊÇ£ºPrivate Declare Function PassPortRead Lib "PPRead.dll" (ByVal InPutData As String, ByVal OutPutData As String) As Integer
Éú³ÉµÄÎļþÄÜÕý³£ÔËÐÐ,²¢ÇÒÄÜÉú³ÉÏàÓ¦Êý¾Ý,µ«ÊÇÔÚµ÷ÊÔʱÌáʾ"DLLµ÷ÓÃÔ¼¶¨´í ......

VB.NET2005¶ÁÈ¡XMLÊý¾Ý

ͨ¹ýµ÷ÓÃCreateDataSetfromXmlÈ¡µÃXMLÊý¾Ý
Imports System.Xml
Public Const FILE_CONFIG = "MZZ.xml"
Public Const PATH_CONFIG = "\XML\"
Dim dstXML As DataSet
Dim tblXML_DB As DataTable
Dim dtCod As New DataTable
Dim strSQL As String = ""

clsPublic ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ