Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - Please help explain the following vb program segment line by line.
Please help explain the following vb program segment line by line.
The dim task is the same length, the ret is the same length, and the pHandle is the same length.

FilePath = App。 path

FileNamel = FilePath & amp" BeforeSort.dat "

File name 2 = file path & amp" \AferSort.dat "

For I = 0 to 9

If Text 1(i)。 Txt = ""and then' set Textl control array, that is, copy and paste at most 10 textbox.

MsgBox "Please enter a real number with serial number" &i+ 1& "!" , vbCritical vbOK0nly, "warning"

outlet connection

If ... it will be over.

then

Open the file name 1 for 0, and the output is # 1

For i = 0 to 9

Print # 1,Val(Text 1(i))。 Text)

then

Close # 1

iTask = Shell(file path & amp; "\ sort.exe", vbhide)' execute the project to ask the price, and then download the sort. Exe (look at the name, like a sorting program).

P handle = openprocess (synchronize, false, itask)' get the handle of sort.exe process.

Ret = waitforsingleobject (p handle, INFlNTE)' get the implementation of sort.exe.

ret = CloseHandle(pHandle)

"Richtextbox1.loadfilefilename2, rftext" displays the sorted contents in richtextbox.

Generally speaking, this is not a complete code.

Missing sort.exe, missing api declaration part.

It is impossible to execute directly.

In addition, there are cases where 1 and l are not divided in the code.