vbʵÏÖĿ¼ÏÂËùÓÐÎļþÃûĿ¼Ãû³ÆµÄ»ñÈ¡
Ç°¼¸ÈÕ£¬Óиö¸çÃÇ˵ÓкܶàµçÓ°£¬ÎÊÎÒÒª²»Òª£¿ÎÒ¾ÍÈÃËûÒ»¸öÒ»¸öµÄд¹ýÀ´£¬ÈøçÃÇÀÛ¸ö²»Çá¡£ËùÒÔ¾ÍÏë¼òµ¥Ð´¸ö³ÌÐò£¬»ñÈ¡Ò»ÏÂÎļþ¼ÐÏÂÃæµÄËùÓÐÎļþÃû³Æ£¬ÕâÑù¾Í¿ÉÒÔ½ÚÊ¡ºÜ¶àʱ¼äÁË¡£
Èí¼þÄØ£¬ÎÒÒѾÉÏ´«µ½ÍøÕ¾ÁË£ºhttp://download.csdn.net/source/1802599
vb°æ±¾Ä¿Â¼»ñÈ¡Æ÷ 1.0£¨Áú¾í·ç³öÆ·£©
˵Ã÷£º
1.Ñ¡ºÃĿ¼ºó£¬¿ÉÒÔÖ±½ÓµÃµ½Ä¿Â¼ÏµÄÎļþ¼ÐºÍÎļþÃû³Æ£¬ÒÔ¼°Í³¼ÆÊýÄ¿¡£
2."Ê÷Ðνṹ"°´¼ü½«»á°Ñ¸÷Îļþ¼ÐºÍÎļþÂÞÁÐÏÂÀ´¡£
3."Ê÷ÐÎÕ¹¿ª"½«°ÑĿ¼ÏµÄ×ÓĿ¼Ҳһ²¢Õ¹¿ª¡£´ó¼Ò²âÊÔµÄʱºòÐèҪעÒ⣬²»ÒªÓÃÌ«ÉîµÄĿ¼À´²â¡£
ÏÂÃ濪ʼ¶¯ÊֵIJ½Ö裺
vbÖÐÓиöº¯ÊýDir()£¬Õâ¸ö¾ÍÊǽñÌìµÄÖ÷½ÇÁË¡£Dir()µÚÒ»´Îµ÷ÓõÄʱºò£¬±ØÐëÖ¸¶¨Â·¾¶¡£È»ºóÆä»á·µ»ØÒ»¸östring£¬Õâ¾ÍÊÇÒ»¸öÎļþ¼Ð£¬»òÕßÒ»¸öÎļþµÄÃû³ÆÁË¡£¾ßÌåÓ÷¨£¬´ó¼Ògoogleһϰɡ£ÎҾͲ»¶à˵ÁË¡£
È»ºó¾ÍÊÇÇø·Ö·µ»ØÖµÊÇÎļþ¼Ð£¬»¹ÊÇÎļþ¡£ÕâÀïÓõ½µÄ¾ÍÊÇvbDirectory(=16)Õâ¸öÊôÐÔÁË¡£
OK. ʣϵľͼòµ¥ÁË£¬ÎÒ°ÑÎÒÈí¼þÖеÄÕⲿ·Ö·¢³öÀ´shareһϣ¬´ó¼Ò²»ÒªËµË®Æ½Ì«²îÓ´£º
Ê×ÏÈÎÒÊǽ«ÎļþÏÔʾ×öÁËÇø·Ö£ºÎļþ¼ÐÃû³ÆÏÔʾfolderlist()£¬ÎļþÃû³ÆÏÔʾfilelist():
Private Function folderlist(pathname As String, treeflag As Integer) 'treeflag:0Áбí 1Ê÷ÐÎ 2Ê÷ÐÎÕ¹¿ª
'Îļþ¼ÐÊýºÍÃû³Æ
Dim sf As String
sf = Dir(pathname, vbDirectory) '»ñÈ¡µÚÒ»¸öĿ¼Ãû
foldernum = 0
Do While sf <> ""
' Ìø¹ýµ±Ç°µÄĿ¼¼°ÉϲãĿ¼
If sf <> "." And sf <> ".." Then
If (GetAttr(pathname + sf) And vbDirectory) = vbDirectory Then
If treeflag = 0 Then
Text2 = Text2 & sf & vbCrLf ' Èç¹ûËüÊÇÒ»¸öĿ¼£¬½«ÆäÃû³ÆÌí¼Óµ½Áбí
ElseIf treeflag = 1 Then
Text2 = Text2 & Treestr & sf & vbCrLf
ElseIf treeflag = 2 Then 'Ê÷ÐÎÕ¹¿ªµÄʱºò£¬ÐèÒªÁ˽â×ÓĿ¼£
Ïà¹ØÎĵµ£º
VBµÄ´úÂë´æ´¢ÔÚÄ£¿éÖС£ÔÚVBÖÐÌṩÁËÈýÖÖÀàÐ͵ÄÄ£¿é£º´°ÌåÄ£¿é¡¢±ê׼ģ¿éºÍÀàÄ£¿é¡£
¡¡¡¡¼òµ¥µÄÓ¦ÓóÌÐò¿ÉÒÔÖ»ÓÐÒ»¸ö´°Ì壬ËùÓõijÌÐò¶¼×¤ÁôÔÚ´°ÌåÄ£¿éÖУ¬¶øµ±Ó¦ÓóÌÐòÅÓ´ó¸´ÔÓʱ£¬¾ÍÒªÁíÍ⸽¼Ó´°Ìå¡£×îÖÕ¿ÉÄÜÓм¸¸ö´°ÌåÖÐÓÐһЩ¹²Í¬¶¼ÒªÖ´ÐеĴúÂ룬ΪÁËÔÚÁ½¸ö´°ÌåÖв»²úÉúÖظ´´úÂ룬¿É´´½¨Ò»¸ö¶ÀÁ¢µÄÄ£¿é£¬ÓÃËüʵÏÖ´ú ......
'´´½¨¿ì½Ý·½Ê½£¬¼æÈÝvista
'Òª°Ñvb6stkit.DLL·Åµ½³ÌÐòĿ¼
'°½Ê¿Î° 09-10-27
'Ö»¶Ô“×ÀÃ攺͓¿ªÆô”ÓÐЧ£¬ÆäËü»¹Ã»×ö
'=========¿ªÆôÍⲿͬ²½³ÌÐò¶¨Ò忪ʼ
Const SYNCHRONIZE = &H100000
Const INFINITE = &HFFFF 'Wait forever
Const WAIT_OBJECT_0 = 0 'The state of the spe ......
Ò»¡£Êý¾ÝÀàÐÍ
Byte 1
×Ö½Ú ÎÞ·ûºÅ
Interger 2
×Ö½Ú
Long 4
×Ö½Ú
Float 4
×Ö½Ú
Double 8
×Ö½Ú
String
Date
Boolean
Currency
Variant
2.
±ä³¤×Ö·û´®ºÍ¶¨³¤×Ö·û
ϵͳĬÈϳõʼֵΪ¿Õ×Ö·û´®;
±ä³¤×Ö·û´®£ºdi ......
VERSION 5.00
Begin VB.Form frmMain
BorderStyle = 1 'Fixed Single
Caption = "Reg Demo"
ClientHeight = 6570
ClientLeft = 45
ClientTop = 435
ClientWidth = 7695
LinkTopic = "Form1"
MaxButton = 0 'False
Min ......
ÔÚVBÖÐÒªÏëµ÷ÓÃExcel£¬ÐèÒª´ò¿ªVB±à³Ì»·¾³“¹¤³Ì”²Ëµ¥ÖеēÒýÓÔÏîÄ¿£¬²¢Ñ¡È¡ÏîÄ¿ÖеēMicrosoft Excel 11.0 object library”Ïî¡£ÓÉÓÚÄãµÄExcel°æ±¾²»Í¬£¬ËùÒÔÕâ¸öÑ¡ÏîµÄ°æ±¾ºÅÒ²ÊDz»Í¬µÄ¡£
ÒòΪEXCELÊÇÒÔ²ã´Î½á¹¹×éÖ¯¶ÔÏóµÄ£¬Æä¶ÔÏóÄ£ÐÍÖк¬ÓÐÐí¶à²»Í¬µÄ¶ÔÏóÔªËØ¡£
&n ......