程序有句代碼是這樣的“Label1.Caption = (Loc(1) * 100 / lDatalen) & "%"運行起來的結(jié)果是,程序保留了13位左右的小數(shù)點Select Case State'...沒有列舉其它情況。Case icError '11vtData = Inet1.ResponseCode & ":" & Inet1.ResponseInfoCase icResponseCompleted ' 12Dim bDone As Boolean: bDone = FalseDim lDatalen As Long: lDatalen = 0vtData() = Inet1.GetChunk(1024, 1) DoEventsOpen savefile.Text For Binary Access Write As #1 If Len(Inet1.GetHeader("Content-Length")) > 0 Then lDatalen = CLng(Inet1.GetHeader("Content-Length"))' CLng(Inet1.GetHeader("Content-Length")) 為文件大小Do While Not bDonePut #1, Loc(1) + 1, vtData()vtData() = Inet1.GetChunk(1024, 1)DoEventsLabel1.Caption = (Loc(1) * 100 / lDatalen) & "%" ProgressBar1.Value = 100 * (Loc(1) / lDatalen)If Loc(1) >= lDatalen Then bDone = TrueLoopClose #1MsgBox "下載完成", vbInformation, End SelectEnd Sub
請問如何去掉所有小數(shù)點呢???求指點啊
互換的青春
2023-04-01 14:10:52