Home > Software engineering >  Call the form is empty
Call the form is empty

Time:10-17

Display as follows, form5, has been the only form the borders, the inside of the content are all empty, I put the last form5) has tried to Hide it, the form can display completely, but according to the comparison of finish, not in form5. After the Show begins to Show,

Answer for help, o


 Private Sub Form_Load () 
Form5) Show
Dim the STP As String
STP=GetSysTempPath
Dim l As String
Dim m As String
Verold="10"
DownloadFile "http://yibadao.net/update/ybdfinal.txt", STP & amp; "Ybd. TXT"
DownloadFile "http://yibadao.net/update/ybdfinalup.txt", STP & amp; "Ybdup. TXT"
If Dir (STP & amp; "\ ybd. TXT")="" Or Dir (STP & amp; "\ ybdup. TXT")="" Then
Inte=0
The Exit Sub
The Else
Inte=1
Open the STP & amp; "\ ybd. TXT" For Input As # 1
Do Until EOF (1)
The Line Input # 1, l 'Line read
Vernew=vbCrLf & amp; L 'written to text1 inside
Loop
Close # 1
Open the STP & amp; "\ ybdup. TXT" For Input As # 1
Do Until EOF (1)
The Line Input # 1, m 'Line read
Upinfo=vbCrLf & amp; M 'written to text1 inside
Loop
Close # 1
End the If
Form2. Label2. Caption=upinfo
Kill the STP & amp; "\ ybd. TXT"
Kill the STP & amp; "\ ybdup. TXT"
If verold & lt;> Vernew Then
Form2. Show
Form5. Hide
End the If
End Sub

CodePudding user response:

DownloadFile is synchronous or asynchronous?
If is asynchronous, the form_load does not show anything after running, because running when the download is not yet complete, even the file has not yet been established,

In addition vernew=vbCrLf & amp; L 'written to text1 inside
This assignment, only the file the last line displays in the text box, if the last line is not character, just a newline, then it does not show anything,
  • Related