我的代码那部分代码是这样的: Private Sub CmdCheck_Click() Dim SearchPath As String, FindStr As String Dim FileSize As Long Dim NumFiles As Integer, NumDirs As Integer Dim iNull As Integer, lpIDList As Long, lResult As Long Dim sPath As String, udtBI As BrowseInfo With udtBI 'ノ靹テ莟タタエーソレ .hWndOwner = Me.hWnd 'キオサリム。ヨミオトトソツシ .ulFlags = BIF_RETURNONLYFSDIRS .pIDLRoot = 0& End With
'オッタタエーソレ lpIDList = SHBrowseForFolder(udtBI) 'Displays a dialog box that enables the user to select a Shell folder If lpIDList Then sPath = String$(MAX_PATH, 0) 'サ。ツキセカ SHGetPathFromIDList lpIDList, sPath 'ハヘキナトレエ・ CoTaskMemFree lpIDList iNull = InStr(sPath, vbNullChar) If iNull Then sPath = Left$(sPath, iNull - 1) End If End If Screen.MousePointer = vbHourglass 'List1.Clear SearchPath = sPath 'ム。ヨミオトトソツシホェヒムヒトニシツキセカ FindStr = "*.tif" 'ヒムヒミタ獎ヘオトホトシ(エヒエヲソノチ櫤ィメ・ ReDim filenames(0) As String PicNum = 0 picnum1 = 0 PicAccount = 0 FileSize = FindFilesAPI(SearchPath, FindStr, NumFiles, NumDirs)
Private Sub CmdCheck_Click()
Dim SearchPath As String, FindStr As String
Dim FileSize As Long
Dim NumFiles As Integer, NumDirs As Integer
Dim iNull As Integer, lpIDList As Long, lResult As Long
Dim sPath As String, udtBI As BrowseInfo
With udtBI
'ノ靹テ莟タタエーソレ
.hWndOwner = Me.hWnd
'キオサリム。ヨミオトトソツシ
.ulFlags = BIF_RETURNONLYFSDIRS
.pIDLRoot = 0& End With
'オッタタエーソレ
lpIDList = SHBrowseForFolder(udtBI) 'Displays a dialog box that enables the user to select a Shell folder
If lpIDList Then
sPath = String$(MAX_PATH, 0)
'サ。ツキセカ
SHGetPathFromIDList lpIDList, sPath
'ハヘキナトレエ・ CoTaskMemFree lpIDList
iNull = InStr(sPath, vbNullChar)
If iNull Then
sPath = Left$(sPath, iNull - 1)
End If
End If
Screen.MousePointer = vbHourglass
'List1.Clear
SearchPath = sPath 'ム。ヨミオトトソツシホェヒムヒトニシツキセカ
FindStr = "*.tif" 'ヒムヒミタ獎ヘオトホトシ(エヒエヲソノチ櫤ィメ・
ReDim filenames(0) As String
PicNum = 0
picnum1 = 0
PicAccount = 0
FileSize = FindFilesAPI(SearchPath, FindStr, NumFiles, NumDirs)
Screen.MousePointer = vbDefault
TxtPicture.FontSize = 13
ImagN1.FileName = filenames(0)
TxtPicture.Text = Right(filenames(0), 35)
'***********************************
ImagN1.SetViewPos 3000, 1881 ***
'***********************************
Text1(0).SetFocus
End Sub
直接实行CHECK按钮不能完成ImagN1.SetViewPos 3000, 1881这句的功能.
只有单步实行才能产生这句话的功能. 请各位高手给点见解. 我再次谢过了