This module is an optimized and upgraded version of vb6.0vb to search for files and transfer them to VB.. NET platform. However, this module is only a function that enables core functions and data exchange. to interact with the program user interface, you must write the program yourself. Now, let's get to know it!
This module features multitasking and Data encapsulation. Simply put, you can use IDs to manage tasks and nest multiple arrays to form a vast Radiation Network. Then, you can obtain any required data from the center. You may still be confused, not afraid. Let's talk about it slowly...
The entire module can be roughly divided into three parts: the Declaration module, the search task operation module, and the retrieval search task information module. (Note: The following programming environment is vs2010, # The code between region and # end region can be folded into one line)
Of course, there are more or less some errors in this module. please correct me and I will try my best to modify it!
**************************************** **************************************
Overall Preview (1.1)
Bytes ----------------------------------------------------------------------------------------------
The first is the declaration module:
Bytes ----------------------------------------------------------------------------------------------
The following is the search task operation module: (the interface function name and its parameter descriptions are provided in the following sections. omitted)
Bytes ----------------------------------------------------------------------------------------------
The following is the search task information module.
**************************************** **************************************
After browsing the entire module, you may have understood this module, so let's go to the details analysis.
**************************************** **************************************
Next, we will introduce the custom type. You can skip this section (1.2) and directly enter the next section (1.3)
**************************************** **************************************
With these custom data types, we can perform operations on the entire data network by ID. Now we can enter the search task operation module.
**************************************** **************************************
Analysis of the search task operation module (1.3)
Bytes ----------------------------------------------------------------------------------------------
First, we need to create a search task and enter the basic information of the search task (onrun is used to ignore the prompts and exercise all the code)
Bytes ----------------------------------------------------------------------------------------------
Next, we will fill in the final data for this task. Imagine how to search for the file data in the task without a search path, so we need to first obtain the file data and then the result data.
# The following are two additional function process codes that have appeared above.
Bytes -----------------------------------------------------------------------------------------------
'The above is the code for getting file data, and the Code for executing the search below
Bytes ----------------------------------------------------------------------------------------------
Sometimes, when we need to change the basic data of a search task, we can call changesreachdata (when onrun is false, if we change multiple data items, the file data will be loaded multiple times, efficiency may decrease. We recommend that you set this parameter to true, but the default value is false)
Bytes ----------------------------------------------------------------------------------------------
In the search task operation, you can create or delete a task. The following code deletes a search task with a specified ID. If no search task is specified or the ID is 0, all search tasks are deleted.
**************************************** **************************************** *
The next step is how to obtain the task information module, which transfers the required data.
**************************************** **************************************** *
Code parsing of the retrieval task information module (1.4)
Bytes -------------------------------------------------------------------------------------------
To obtain data, we must first have the task id. If we do not know the task id, we can search the task id using keywords (Note: keyword matching is more accurate)
Bytes -------------------------------------------------------------------------------------------
With the ID, we can get the search results for the task.
Bytes -------------------------------------------------------------------------------------------
In addition, if you want to obtain the number of current search tasks, you can also obtain them through the interface.
Bytes -------------------------------------------------------------------------------------------
In other cases, we can obtain all the information of a search task through the interface.
**************************************** **************************************** *******
Well, basically, this is the case. Although the function of this module is good, it is not very good in Information Feedback. Programmers need to write their own code when writing the user window. You can also add your code, such as saving and reading task information and calling back information...
Note: The Code of this module can be downloaded from the multi-task file search module (three points required)
By wind and dream