第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

以下是我自己寫的搜索函數(shù),請問函數(shù)被調(diào)用之后怎么讓它暫停下來又怎么讓它繼續(xù)執(zhí)行?

以下是我自己寫的搜索函數(shù),請問函數(shù)被調(diào)用之后怎么讓它暫停下來又怎么讓它繼續(xù)執(zhí)行?

Smart貓小萌 2022-12-21 19:15:33
Public Sub SearchSuffix(ByVal Path As String, ByVal Suffix As String)On Error Resume NextDim PathChild() As StringDim SPath As StringDim Temp As LongDim Number As LongDim CurrentPath As StringIf Right(Path, 1) <> "\" ThenPath = Path & "\"End IfSPath = Dir(Path, vbNormal Or vbReadOnly Or vbHidden Or vbSystem Or vbDirectory Or vbVolume)Do While SPath <> "" CurrentPath = Path & SPathForm1.StaPath.Panels(1).Text = CurrentPathDoEventsIf SPath <> "." And SPath <> ".." Then' 使用位比較來確定 SPath 代表一目錄。If (GetAttr(Path & SPath) And vbDirectory) = vbDirectory ThenTemp = Temp + 1ReDim Preserve PathChild(Temp)PathChild(Temp) = SPathElseIf UCase(Right(SPath, Len(Suffix))) = UCase(Suffix) ThenForm1.List1.AddItem Path & SPathEnd IfEnd IfEnd IfSPath = DirLoopFor Number = LBound(PathChild) To UBound(PathChild)If PathChild(Number) <> "" ThenSearchSuffix Path & PathChild(Number), SuffixEnd IfNext NumberEnd Sub
查看完整描述

3 回答

?
臨摹微笑

TA貢獻1982條經(jīng)驗 獲得超2個贊

API函數(shù)sleep()
功能暫停執(zhí)行,參數(shù)單位毫秒
如:sleep(1000) 暫停1秒
Public Declare Sub Sleep Lib "kernel32" Alias "Sleep" (ByVal dwMilliseconds As Long)


查看完整回答
反對 回復(fù) 2022-12-25
?
神不在的星期二

TA貢獻1963條經(jīng)驗 獲得超6個贊

dim needtostop as boolean
Private Sub Form_Load()
needtopause=false
end sub

private sub buttonpauseclick()
needtopause=true
end sub

private sub buttonresumeclick()
needtopause=false
end sub

....
Do While SPath <> "" 
CurrentPath = Path & SPath
Form1.StaPath.Panels(1).Text = CurrentPath
DoEvents
while needtopause
doevents
wend
If SPath <> "." And SPath <> ".." Then
' 使用位比較來確定 SPath 代表一目錄。

....

這樣應(yīng)該在制定的loop之內(nèi)暫停


查看完整回答
反對 回復(fù) 2022-12-25
?
大話西游666

TA貢獻1817條經(jīng)驗 獲得超14個贊

While條件加一個(Not Pause),跳出While之后記錄下CurrentPath

查看完整回答
反對 回復(fù) 2022-12-25
  • 3 回答
  • 0 關(guān)注
  • 112 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號