VB/VBAͨÓ÷¾¶Ñ¡Ôñ¶Ô»°¿ò
Option Explicit
Private Type BROWSEINFO
hOwner As Long
pidlRoot As Long
pDisplayName As String
lpTitle As String
ulFlags As Long
lpfn As Long
lParam As Long
iImage As Long
End Type
Private Declare Function SHGetPathfromIDList Lib "shell32.dll" Alias _
"SHGetPathfromIDListA" (ByVal pidl As Long, _
ByVal pPath As String) As Long
Private Declare Function SHBrowseForFolder Lib "shell32.dll" Alias _
"SHBrowseForFolderA" (lpBrowseInfo As BROWSEINFO) _
As Long
Private Const BIF_RETURNONLYFSDIRS = &H1
' *******************************************************************
' º¯ÊýÃû: BrowseFolder
' ¹¦ÄÜ: ä¯ÀÀ¼°Ñ¡ÔñÎļþ¼ÐͨÓöԻ°¿ò
' ʹÓ÷½·¨:£¨1£©½«mdlBrowseFolder.basÄ£¿éÌí¼Óµ½µ±Ç°¹¤³ÌÖÐ;
' (2£©ÔÚµ±Ç°¹¤³ÌÖÐʹÓÃ
' dim strMyPath as String
' strMyPath=BrowseFolder("ÇëÑ¡ÔñĿ¼")
' ´úÂë¶Î½øÐе÷Óã¬Óû§Ñ¡ÔñµÄĿ¼½«±£´æÔÚstrPath×Ö·û´®±äÁ¿ÏÂ;
' (3) Èç¹ûÓû§Ñ¡Ôñ"È¡Ïû"°´Å¥,ÔòstrPathµÄֵΪ¿Õ;
' *******************************************************************
Public Function BrowseFolder(strDialogTitle As String) As String
Dim X As Long
Dim bi As BROWSEINFO
Dim dwIList As Long
Dim strPath As String
Dim wPos As Integer
With bi
.hOwner = 0& 'hWndAccessApp
.lpTitle = strDialogTitle
.ulFlags = BIF_RETURNONLYFSDIRS
End With
dwIList = SHBrowseForFolder(bi)
strPath = Space$(512)
X = SHGetPathfromIDList(ByVal dwIList, ByVal strPath)
If X Then
wPos = InStr(strPath, Chr(0))
BrowseFolder = Left$(strPath, wPos - 1)
Else
BrowseFolder = vbNullString
End If
' È·±£·µ»ØµÄ·¾¶×Ö·û´®µÄ×îºóÒ»¸ö×Ö·ûΪ"\"
If BrowseFolder <> "" And Right(Trim(BrowseFolder), 1) <> "\" Then
BrowseFolder = BrowseFolder & "\"
End If
End Function
' ²âÊÔʾÀý
Sub Main
Ïà¹ØÎĵµ£º
ÔÚ×îеÄWindows Workflow Fonudation(WF4, ÏÂÎÄÖн«¼ò³ÆWF4)ÖУ¬WFÖÐÒýÈëÁËVB expression£¬Óû§¿ÉÒÔͨ¹ývb±í´ïʽΪ±äÁ¿¸³Öµ¡£ÓÐÐËȤµÄÅóÓÑ¿ÉÒÔ°²×°VS 2010£¬È»ºóʹÓÃÒ»ÏÂÕâ¸ö¹¦ÄÜ¡£¹ØÓÚÕâ¸ö¹¦ÄܵIJο¼£¬Çë¿´£ºhttp://msdn.microsoft.com/en-us/library/ee342461.aspx ʲô£¿ ²»ÖªµÀɶÊÇWF£¬Å¶£¬ÐÒ¿÷ÄãÓöµ½ÎÒ£¬ ......
c:\windows\sytem32\ieframe.dll\1ÕÒ²»µ½,´íÎó½â¾ö·½°¸.
Õâ¸öieframe.dllÊÇvbÖÐWebBrowser µ÷ÓõĿؼþ£¬µ±ÄãÓÃvbÔٴδò¿ªÄãµÄ¹¤³ÌÖ®ºó£¬¾Í¿ÉÒÔ·¢ÏÖÒÔÇ°µÄWebBrowser ¿Ø¼þûÓÐÁË¡£¶øÇÒÔٴμÓÔØÒ²ÊDz»ÄܵÄÁË£¬Õâʱ¾ÍÐèÒªÓõ½ÏÂÃæµÄ·½·¨À´´¦Àí£º
°ÑÒÔÏÂÄÚÈÝ×ö³ÉÒ»¸ö×¢²á±íÎļþfixieframe.reg£¬µ¼Èë×¢²á±í¼´¿É£º
Windows Re ......
¾Ý˵vb6ÖÐ,×Ö ·û´®ÒÔÒÔUNICODE·½Ê½´æ´¢£¬ËùÒÔ
Private Type UDT
lngM1 As Long
lngM2 As Long
strM3 As String * 18
strM4 As String * 8
lngM5 As Long
End Type
Private Sub Command4_Click()
Dim tmp As UDT
With tmp
.lngM1 = 1
.lngM2 = 2
' .str ......
¡¡¡¡SQLDMO£¨SQL Distributed Management Objects£¬SQL·Ö²¼Ê½¹ÜÀí¶ÔÏ󣩷â×° Microsoft SQL Server 2000 Êý¾Ý¿âÖеĶÔÏó¡£SQL-DMO ÔÊÐíÓÃÖ§³Ö×Ô¶¯»¯»ò COM µÄÓïÑÔ±àдӦÓóÌÐò£¬ÒÔ¹ÜÀí SQL Server °²×°µÄËùÓв¿·Ö¡£ SQL-DMO ÊÇ SQL Server 2000 ÖÐµÄ SQL Server ÆóÒµ¹ÜÀíÆ÷ËùʹÓõÄÓ¦ÓóÌÐò½Ó¿Ú (API);Òò´ËʹÓà SQL-DMO µÄÓ ......