Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB
ÈÈÃűêÇ©£º c c# c++ asp asp.net linux php jsp java vb Python Ruby mysql sql access Sqlite sqlserver delphi javascript Oracle ajax wap mssql html css flash flex dreamweaver xml
 ×îÐÂÎÄÕ : vb

VB±éÀúµ±Ç°Ä¿Â¼

Option Explicit
Dim FSO As New FileSystemObject
Dim currentFolder As Folder
Dim currentFolderName As String
Dim folderItem, fileItem
Private Sub Form_Load()

currentFolderName = FSO.GetFolder(App.Path) & "\content"
SeachFolder (FSO.GetFolder(currentFolderName))

End Sub
Function SeachFolder(str As String)
Dim itemFolder
Dim curFolder As Folder
Set curFolder = FSO.GetFolder(str)

Dim itemFile
For Each itemFolder In curFolder.SubFolders
SeachFolder (CStr(itemFolder))
Me.Text1.Text = Me.Text1.Text & itemFolder & Chr(13) & Chr(10)
For Each itemFile In itemFolder.Files
Me.Text1.Text = Me.Text1.Text & itemFile & Chr(13) & Chr(10)
Next
Next

End Function
×¢£º ÒªÓÃFSO£¬ÐèÒªÒýÓÃMicrosoft Scripting Runtime£¬´°ÌåÉÏÒª·ÅÒ»¸ötext¿Ø¼þ£¬ÓÃÀ´ÏÔʾ¡£ ......

VB ×Ö·û´®´¦Àíº¯Êý¼¯

·ÖÀࣺVBѧϰ ×ֺţº ´ó´ó  ÖÐÖР СС mid(×Ö·û´®£¬´ÓµÚ¼¸¸ö¿ªÊ¼£¬³¤¶È)  ÔÚ[×Ö·û´®]ÖÐ[´ÓµÚ¼¸¸ö¿ªÊ¼]È¡³ö[³¤¶È¸ö×Ö·û´®]   
ÀýÈç mid("СÐÀÎÞµÐ",1,3) Ôò·µ»Ø "СÐÀÎÞ"   
instr(´ÓµÚ¼¸¸ö¿ªÊ¼,×Ö·û´®1,×Ö·û´®2) ´Ó¹æ¶¨µÄλÖÿªÊ¼²éÕÒ£¬·µ»Ø×Ö·û´®2ÔÚ×Ö·û´®1ÖеÄλÖà  
ÀýÈç instr(1,"СÐÀÎÞµÐ","С") Ôò·µ»Ø 1,instr(2,"СÐÀÎÞµÐ","С")£¬Ôò·µ»Ø 0 ¡£ 0 ±íʾδÕÒµ½   
InStrRev(×Ö·û´®1,×Ö·û´®2,´ÓµÚ¼¸¸ö¿ªÊ¼) ´Ó¹æ¶¨µÄλÖÿªÊ¼£¬´Óºóסǰ²éÕÒ£¬·µ»Ø×Ö·û´®2ÔÚ×Ö·û´®1ÖеÄλÖ㬴˴¦×¢Ò⣬ËäÊÇ´Óºóסǰ²éÕÒ£¬µ«ÊÇ·µ»ØµÄÖµ»¹ÊÇ´ÓÇ°ÍùºóËãµÄ¡£   
ÀýÈç instrRev("СÐÀÎÞµÐ","С",2) Ôò·µ»Ø 2 ; instrRev("СÐÀÎÞµÐ","ÐÀ",1) Ôò·µ»Ø 0 ,ÒòΪËü´Ó"СÐÀÎÞµÐ"µÄµÚ1¸ö×Ö¿ªÊ¼ÍùÇ°²éÕÒ£¬ËùÒÔÕÒ²»µ½ ¡£0 ±íʾδÕÒµ½   
left(×Ö·û´®,³¤¶È) ´Ó[×Ö·û´®]µÄ×ó±ß¿ªÊ¼·µ»Ø[³¤¶È]¸ö×Ö·û   
ÀýÈç Left("СÐÀÎÞµÐ,3) Ôò·µ»Ø "СÐÀÎÞ"   
right(×Ö·û´® ......

VB ÖÐÑÕÉ«»¥Ïàת»»µÄÁ½¸öСº¯Êý(REGºÍ VBÑÕ)

VBÑÕÉ«ºÍRGBÉ«»¥Ïàת»»Í·ÌÛÁËÎÒºÃÒ»¶Îʱ¼ä,Èç½ñÕÒµ½½â¾ö°ì·¨ÁË
ÌرðÌù³öÀ´Óë´ó¼Ò¹²Ïí 
Type RGB
    Red As String
    Green As String
    Blue As String
End Type
Public Function ColorToRGB(ByVal dwColor As Long) As RGB
    Dim clrHex As String
    clrHex = Replace(Format(Hex$(dwColor), "@@@@@@"), " ", "0")
    ColorToRGB.Red = Mid$(clrHex, 5, 2)
    ColorToRGB.Green = Mid$(clrHex, 3, 2)
    ColorToRGB.Blue = Mid$(clrHex, 1, 2)    '
End Function
Public Function RgbToColor(ByVal rColor As String)
    Dim tempColor As String, RedColor As String, GreenColor As String, BlueColor As String
    tempColor = Replace(rColor, "0x", "")
    RedColor = Mid(tempColor, 1, 2)
    GreenColor = Mid(tempColor, 3, 2)
    BlueColor = Mid(tempColor, 5, 2)
    RgbToCol ......

ÓÃvbÔõô»ñÈ¡ÍøÒ³±êÌâ

http://tieba.baidu.com/f?kz=255370663
ËѼ¯µ½Ò»¸ö³ÌÐò
¼¸ºõ¶¼ÓÃËüÀ´Íê³É²É¼¯ÈÎÎñÁË£¡¹±Ï׳öÀ´°¡£¬ºÜ¼òµ¥µÎ
Function strCut(strContent, StrStart, StrEnd) As String 'ͨÓýØÈ¡º¯Êý
 Dim strHtml, S1, S2 As String
 dim strstart,strend as string
 strHtml = strContent
 On Error Resume Next
 
 S1 = InStr(strHtml, StrStart) + Len(StrStart)
 S2 = InStr(S1, strHtml, StrEnd)
 strCut = Mid(strHtml, S1, S2 - S1)
 
End Function
Private Sub Form_Load()
Dim hunzi1, hunzi2 As String
hunzi1 = "<html><title>this is title</title></html>"
hunzi2 = strCut(hunzi1, "<title>", "</title>")
MsgBox hunzi2
End Sub ......

VB/C++/C#´®¿ÚͨѶԴ´úÂ롾¸½ÏêϸעÊÍ¡¿


VB
    If MSComm1.PortOpen = True Then MSComm1.PortOpen = False
    MSComm1.CommPort = i1
    MSComm1.PortOpen = True
    MSComm1.InputMode = comInputModeBinary
    MSComm1.InBufferCount = 0
    MSComm1.InputLen = 0
    MSComm1.Settings = "9600,N,8,1"
    MSComm1.RThreshold = 1
    MSComm1.OutBufferCount = 0
C++
/****************************************************************/
//´®Ðпڳõʼ»¯
if(m_ctrlComm.GetPortOpen())   //Èç¹û´®¿ÚÒѾ­´ò¿ª£¬Ôò¹Ø±Õ¡£
  m_ctrlComm.SetPortOpen(FALSE);
m_ctrlComm.SetCommPort(1);    //Ñ¡Ôñcom1
if( !m_ctrlComm.GetPortOpen()) ×Ö´®9
  m_ctrlComm.SetPortOpen(TRUE);  //´ò¿ª´®¿Ú
else
  AfxMessageBox("²»ÄÜ´ò¿ª´®Ðпڣ¡");
m_ctrlComm.SetSettings("9600,n,8,1"); //²¨ÌØÂÊ9600£¬ÎÞУÑ飬8¸öÊý¾Ý룬1¸ö ......

VB/C++/C#´®¿ÚͨѶԴ´úÂ롾¸½ÏêϸעÊÍ¡¿


VB
    If MSComm1.PortOpen = True Then MSComm1.PortOpen = False
    MSComm1.CommPort = i1
    MSComm1.PortOpen = True
    MSComm1.InputMode = comInputModeBinary
    MSComm1.InBufferCount = 0
    MSComm1.InputLen = 0
    MSComm1.Settings = "9600,N,8,1"
    MSComm1.RThreshold = 1
    MSComm1.OutBufferCount = 0
C++
/****************************************************************/
//´®Ðпڳõʼ»¯
if(m_ctrlComm.GetPortOpen())   //Èç¹û´®¿ÚÒѾ­´ò¿ª£¬Ôò¹Ø±Õ¡£
  m_ctrlComm.SetPortOpen(FALSE);
m_ctrlComm.SetCommPort(1);    //Ñ¡Ôñcom1
if( !m_ctrlComm.GetPortOpen()) ×Ö´®9
  m_ctrlComm.SetPortOpen(TRUE);  //´ò¿ª´®¿Ú
else
  AfxMessageBox("²»ÄÜ´ò¿ª´®Ðпڣ¡");
m_ctrlComm.SetSettings("9600,n,8,1"); //²¨ÌØÂÊ9600£¬ÎÞУÑ飬8¸öÊý¾Ý룬1¸ö ......

VB/C++/C#´®¿ÚͨѶԴ´úÂ롾¸½ÏêϸעÊÍ¡¿


VB
    If MSComm1.PortOpen = True Then MSComm1.PortOpen = False
    MSComm1.CommPort = i1
    MSComm1.PortOpen = True
    MSComm1.InputMode = comInputModeBinary
    MSComm1.InBufferCount = 0
    MSComm1.InputLen = 0
    MSComm1.Settings = "9600,N,8,1"
    MSComm1.RThreshold = 1
    MSComm1.OutBufferCount = 0
C++
/****************************************************************/
//´®Ðпڳõʼ»¯
if(m_ctrlComm.GetPortOpen())   //Èç¹û´®¿ÚÒѾ­´ò¿ª£¬Ôò¹Ø±Õ¡£
  m_ctrlComm.SetPortOpen(FALSE);
m_ctrlComm.SetCommPort(1);    //Ñ¡Ôñcom1
if( !m_ctrlComm.GetPortOpen()) ×Ö´®9
  m_ctrlComm.SetPortOpen(TRUE);  //´ò¿ª´®¿Ú
else
  AfxMessageBox("²»ÄÜ´ò¿ª´®Ðпڣ¡");
m_ctrlComm.SetSettings("9600,n,8,1"); //²¨ÌØÂÊ9600£¬ÎÞУÑ飬8¸öÊý¾Ý룬1¸ö ......

VB/C++/C#´®¿ÚͨѶԴ´úÂ롾¸½ÏêϸעÊÍ¡¿


VB
    If MSComm1.PortOpen = True Then MSComm1.PortOpen = False
    MSComm1.CommPort = i1
    MSComm1.PortOpen = True
    MSComm1.InputMode = comInputModeBinary
    MSComm1.InBufferCount = 0
    MSComm1.InputLen = 0
    MSComm1.Settings = "9600,N,8,1"
    MSComm1.RThreshold = 1
    MSComm1.OutBufferCount = 0
C++
/****************************************************************/
//´®Ðпڳõʼ»¯
if(m_ctrlComm.GetPortOpen())   //Èç¹û´®¿ÚÒѾ­´ò¿ª£¬Ôò¹Ø±Õ¡£
  m_ctrlComm.SetPortOpen(FALSE);
m_ctrlComm.SetCommPort(1);    //Ñ¡Ôñcom1
if( !m_ctrlComm.GetPortOpen()) ×Ö´®9
  m_ctrlComm.SetPortOpen(TRUE);  //´ò¿ª´®¿Ú
else
  AfxMessageBox("²»ÄÜ´ò¿ª´®Ðпڣ¡");
m_ctrlComm.SetSettings("9600,n,8,1"); //²¨ÌØÂÊ9600£¬ÎÞУÑ飬8¸öÊý¾Ý룬1¸ö ......

VB ʵÏÖÖÐÎÄÎı¾µÄ¼ÓÃÜ·½·¨

VBÎı¾¼ÓÃÜ ÌرðÉè¼Æµ½ÖÐÎļÓÃÜ ÈúܶàÈ˷Ѿ¡ÖÜÕÛ,¾­³£»áÅöµ½½âÃÜÖÐÎijöÏÖÂÒÂëµÄÇé¿ö
ÏÂÃæÕâƪÎÄÕ½«¶Ô´Ë×öÁË˵Ã÷
´úÂëÒ²ÔÚÎÄÕÂÀïÃæ°üÀ¨
¼ÆËã»úÊÀ½ç2000ÄêµÚ36ÆÚ
ʵÏÖÖÐÎÄÎı¾µÄ¼ÓÃÜ·½·¨
Î人½»Í¨¿Æ¼¼´óѧ¼ÆËã»ú¿ÆѧÓ빤³Ìϵ ÎâÒµ¸£
¡¡¡¡
      ±¾ÎĽéÉÜÁËÔÚVB6ÖÐʵÏÖÖС¢Ó¢ÎÄÎı¾¼Ó¡¢½âÃܵļ¼Êõϸ½Ú¡£ÎÄÖÐÉîÈëµØ̽ÌÖÁËVB6Öкº×Ö¼Ó¡¢½âÃܵÄÔ­Àí¡¢É¢Áк¯ÊýµÄ¹¹Ôì·½°¸£¬ÔÚ¼Ó¡¢½âÃÜ·½²úÉúÉ¢Áк¯ÊýµÄÖÖ×ÓÖµ£¨³õʼֵ£©ºÍÓÃÓÚ¼Ó¡¢½âÃܵÄËæ»úÐòÁÐÊýµÄ·½·¨¡£×îºó¸Ã¼¼ÊõʵÏÖÁËÒ»¸ö¼òµ¥µÄ128λµÄ¼Ó¡¢½âÃÜ·½°¸¡£ÎÄÖÐÉæ¼°µ½Á˼ÓÃܼ¼ÊõµÄһЩÖ÷Òª¹Ø¼ü¸ÅÄî¼°Æä¾ßÌåʵÏÖ¼¼Êõ£¬ÈçÉ¢Áк¯Êý¡¢¼ÓÃÜÇ¿¶ÈµÈ¡£¡¡
Ð÷ ÂÛ
¡¡¡¡¼ÓÃÜ£¨Encryption£©ÊÇÐÅÏ¢±£»¤µÄÒ»Öֱز»¿ÉÉÙµÄÊֶΡ£Ä¿Ç°ÓÐÁ½ÖÖ»ù±¾µÄ¼ÓÃÜ·½·¨£¬¼´Ë½Ô¿¼ÓÃܺ͹«Ô¿¼ÓÃÜ¡£ÓÃVB¼È¿ÉÓÃ×Ô¶¨ÒåË㷨ʵÏÖ¼ò±ãµÄ˽Կ¼ÓÃÜ£¬Ò²¿Éͨ¹ýµ÷ÓÃCrypto API½Ó¿ÚʵÏÖ¸´ÔӵĹ«Ô¿¼ÓÃÜ¡£
¡¡¡¡±¾ÎĽéÉÜÒ»ÖÖ˽Կ¼ÓÃܼ¼Êõ£¬²»½öÄܼÓÃÜÓ¢ÎÄÎı¾£¬¶øÇÒÄÜÓÐЧ¼ÓÃܺº×Ö¡£
¡¡¡¡ÃÜÎÄÎı¾=HASH(DateTime)£«HASH(DateTime£«Key)£« Encryption(Text,HASH(DateTime)£«HASH(DateTime£«Key)
¡¡¡¡ VB¾ßÌåʵÏÖ¼¼Êõ
¡¡¡¡1£® »ù±¾¼Ó½ ......
×ܼǼÊý:380; ×ÜÒ³Êý:64; ÿҳ6 Ìõ; Ê×Ò³ ÉÏÒ»Ò³ [54] [55] [56] [57] 58 [59] [60] [61] [62] [63]  ÏÂÒ»Ò³ βҳ
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ