怎么在VB的界面中做出象Windows那样的浏览按钮呢????
我在VB的界面中想做一个象Windows那样的浏览按钮!该怎样做呢!谢谢了! 问题点数:20、回复次数:5Top
1 楼cainiao2002(大笨鸟)回复于 2002-04-08 12:03:11 得分 0
什么浏览按钮?浏览器么?说清楚点!Top
2 楼gaoqi5037(高岐)回复于 2002-04-08 12:10:33 得分 0
自已做个ActiveX Ocx吧
我自已做了一个用MouseExit MouseEnter 事件的Button如需要留下E-mail
有源码。Top
3 楼bafenghan(我爱睡觉我爱睡觉我爱睡觉我真的好爱睡觉)回复于 2002-04-08 12:18:20 得分 0
bafenghan@sina.com
急需!谢谢了!Top
4 楼gaoqi5037(高岐)回复于 2002-04-08 13:02:05 得分 20
邮件已发送,注意查收!
Top
5 楼uguess(天地间,有我在行走!)回复于 2002-04-08 13:33:56 得分 0
Private Type BrowseInfo
hWndOwner As Long
pIDLRoot As Long
pszDisplayName As Long
lpszTitle As Long
ulFlags As Long
lpfnCallback As Long
lParam As Long
iImage As Long
End Type
Const BIF_RETURNONLYFSDIRS = 1
Const MAX_PATH = 260
Private Declare Sub CoTaskMemFree Lib "ole32.dll" (ByVal hMem As Long)
Private Declare Function lstrcat Lib "kernel32" Alias "lstrcatA" (ByVal lpString1 As String, ByVal lpString2 As String) As Long
Private Declare Function SHBrowseForFolder Lib "shell32" (lpbi As BrowseInfo) As Long
Private Declare Function SHGetPathFromIDList Lib "shell32" (ByVal pidList As Long, ByVal lpBuffer As String) As Long
Private Sub Form_Load()
'KPD-Team 1998
'URL: http://www.allapi.net/
'KPDTeam@Allapi.net
Dim iNull As Integer, lpIDList As Long, lResult As Long
Dim sPath As String, udtBI As BrowseInfo
With udtBI
'Set the owner window
.hWndOwner = Me.hWnd
'lstrcat appends the two strings and returns the memory address
.lpszTitle = lstrcat("C:\", "")
'Return only if the user selected a directory
.ulFlags = BIF_RETURNONLYFSDIRS
End With
'Show the 'Browse for folder' dialog
lpIDList = SHBrowseForFolder(udtBI)
If lpIDList Then
sPath = String$(MAX_PATH, 0)
'Get the path from the IDList
SHGetPathFromIDList lpIDList, sPath
'free the block of memory
CoTaskMemFree lpIDList
iNull = InStr(sPath, vbNullChar)
If iNull Then
sPath = Left$(sPath, iNull - 1)
End If
End If
MsgBox sPath
End Sub
Top




