RT ,API函数有SHGetPathFromIDList,SHBrowseForFolder 了 ,我现在想使用这些函数实现定位文件,并获取文件的全路径,应该怎么做,谁能教教我。。 在线等 急用!!!!!!或则有什么 好的方法的。。(最好也是API 函数,不要CommonDialog。#17 )
解决方案 »
- combobox的默认值的问题,谢谢啊!
- 怎样删除DATAGRID里选中行的记录?而不从数据库删除。
- vb写 程序问题
- VB+Access数据库,怎么用Ssql语句在表增加一个字段,数据类型为时期/时间,格式为长时间
- 如何得到硬盘ID号(就是W2k设备管理器->磁盘驱动器的那个~)
- vsflexgrid 控件与ADODC控件绑定
- 在一个窗体上有多个文本框,当我点某个按钮时,所有文本框均清空,不知道有没有这样的一条语句?
- 求救!来者有分!
- 一个值得探讨的问题,关于在文本文件中查找字符串问题的~!!不够给分--------------------------
- 到底该学什么?
- 在已知IE窗口的句柄如何能获取的IHTMLDOCUMENT内容
- 从仪表读取的数据是乱码
lStructSize As Long
hwndOwner As Long
hInstance As Long
lpstrFilter As String
lpstrCustomFilter As String
nMaxCustFilter As Long
nFilterIndex As Long
lpstrFile As String
nMaxFile As Long
lpstrFileTitle As String
nMaxFileTitle As Long
lpstrInitialDir As String
lpstrTitle As String
flags As Long
nFileOffset As Integer
nFileExtension As Integer
lpstrDefExt As String
lCustData As Long
lpfnHook As Long
lpTemplateName As String
End Type Private Declare Function GetOpenFileName Lib "comdlg32.dll" Alias "GetOpenFileNameA" (pOpenfilename As OPENFILENAME) As Long
Private Declare Function CommDlgExtendedError Lib "comdlg32.dll" () As Long
Private Sub Form_Load()
Dim zmh1 As OPENFILENAME
With zmh1
.lStructSize = Len(zmh1)
.lpstrFile = String(255, 0)
.nMaxFile = 255
.lpstrFileTitle = String(255, 0)
.nMaxFileTitle = 255
End With
zmh2 = GetOpenFileName(zmh1)
file1 = Left$(zmh1.lpstrFile, zmh1.nMaxFile)
file1 = Replace(file1, Chr(0), "")
file2 = Left$(zmh1.lpstrFileTitle, zmh1.nMaxFileTitle)
file2 = Replace(file2, Chr(0), "")
MsgBox file1 & vbCrLf & file2
End Sub