vb ´´½¨¿ì½Ý·½Ê½ ¼æÈÝvista XP
'´´½¨¿ì½Ý·½Ê½£¬¼æÈÝvista
'Òª°Ñvb6stkit.DLL·Åµ½³ÌÐòĿ¼
'°½Ê¿Î° 09-10-27
'Ö»¶Ô“×ÀÃæ”ºÍ“¿ªÆô”ÓÐЧ£¬ÆäËü»¹Ã»×ö
'=========¿ªÆôÍⲿͬ²½³ÌÐò¶¨Ò忪ʼ
Const SYNCHRONIZE = &H100000
Const INFINITE = &HFFFF 'Wait forever
Const WAIT_OBJECT_0 = 0 'The state of the specified object is signaled.
Const WAIT_TIMEOUT = &H102 'The time-out interval elapsed, and the
Private Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long
Private Declare Function WaitForSingleObject Lib "kernel32" (ByVal hHandle As Long, ByVal dwMilliseconds As Long) As Long
Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long
'=========¿ªÆôÍⲿͬ²½³ÌÐò¶¨Òå½áÊø
'´´½¨¿ì½Ý·½Ê½
Private Declare Function fCreateShellLink Lib "vb6stkit.DLL" ( _
ByVal lpstrFolderName As String, _
ByVal lpstrLinkName As String, _
ByVal lpstrLinkPath As String, _
ByVal lpstrLinkArgs As String, _
ByVal fPrivate As Long, _
ByVal sParent As String) As Long
'
'lpstrFolderName Îļþ¼ÐµÄÃû³Æ “$(proprams)” ³ÌÐò×é "$(Strar Menu)" ¿ªÊ¼²Ëµ¥
'lpstrLinkName ¿ì½Ý¼üµÄÃû³Æ
'
'lpstrLinkPath ¿ì½Ý¼üµÄ·¾¶
'
'lpstrLinkArgs ÕâÀïÊÇÃüÁîÐвÎÊý
'
'fPrivate True
'
'sParent ÉÏÒ»²ãÎļþ¼Ð
'¿ì½Ý·½Ê½Öеij£Êý
Public Enum ShortCutPosition
vbDesktop = 1 '×ÀÃæ
vbStart = 2 'Æô¶¯Ïî
vbStartMenu = 3 '¿ªÊ¼²Ëµ¥³ÌÐòÏî
vbGroup = 4 '¿ªÊ¼²Ëµ¥¶¥¶Ë
End Enum
'¿ªÆôÍⲿͬ²½³ÌÐò¹ý³Ì
Private Sub cmdShell(s_cmd As String)
Dim lPid As Long
Dim lHnd As Long
Dim lRet As Long
lPid = Shell(s_cmd, vbNormalFocus)
If lPid <> 0 Then
lHnd = OpenProcess(SYNCHRONIZE, 0, lPid) 'Get a handle to the shelled process.
If lHnd <> 0 Then 'If successful, wait for the
lRet = WaitForSingleObject(lHnd, INFINITE) ' application to end.
CloseHandle (lHnd)
Ïà¹ØÎĵµ£º
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 ......
·ÖÀࣺVBѧϰ ×ֺţº ´ó´ó ÖÐÖРСС mid(×Ö·û´®£¬´ÓµÚ¼¸¸ö¿ªÊ¼£¬³¤¶È) ÔÚ[×Ö·û´®]ÖÐ[´ÓµÚ¼¸¸ö¿ªÊ¼]È¡³ö[³¤¶È¸ö×Ö·û´®]
ÀýÈç mid("СÐÀÎÞµÐ",1,3) Ôò·µ»Ø "СÐÀÎÞ"
instr(´ÓµÚ¼¸¸ö¿ªÊ¼,×Ö·û´®1,×Ö·û´®2) ´Ó¹æ¶¨µÄλÖÿªÊ¼²éÕÒ£¬·µ»Ø×Ö·û´®2ÔÚ×Ö·û´®1Öе ......
VBʵÏÖVC TabControl¿Ø¼þ
н¨Ò»¸ö¹¤³ÌÎļþProject1£¬
ÔÚ×ó²à¹¤¾ßÀ¸ÖеãÓÒ¼ü
ÔÚ³öÏÖµÄÑ¡ÏîÖеã“Components”£¬ÔÚ´ò¿ª´°¿ÚÖÐÕÒµ½“Controls”Ñ¡ÏîÒ²ÖеēMicrosoft Tabbed Dialog Control 6.0”£¬È»ºóµã“Ó¦ÓÔ“È·¶¨”Í˳ö¸Ãҳà ......
Õä¹óvbº¯ÊýÁбí
Variant ±äÁ¿µÄÄÚ²¿±íʾ:
_______________________________________________________________
·ûºÅ³£Á¿ Öµ ÄÚ²¿±íʾ ×Ö½ÚÊý
V_EMPTY 0 Empty
V_NULL 1 Null
V_INTEGER 2 Interger 2
V_LONG 3 Long 4
V_SINGLE 4 Single 4
V_DOUBLE 5 Double 8
V_CURRENCY 6 Currency 8
V_DATE 7 Date 8
V_STRI ......
Private Sub Command1_Click()
Dim MyComm As New ADODB.Command '¶¨ÒåÒ»¸öÃüÁî¶ÔÏó
Dim Rs_GetList As New ADODB.Recordset '¶¨ÒåÒ»¸ö¼Ç¼¼¯¶ÔÏó
Dim param As ADODB.Parameter ......