Home > Software engineering > Vb connection TXT file, read TXT file how to format the name and code rate corresponding to
Vb connection TXT file, read TXT file how to format the name and code rate corresponding to
Time:09-16
Vb connection LST file, a text box 1 and 2 input data, click on add display list1 and combo1 below, click save to add data in files,
Next time you run the program, the program automatically read from the file content, the result is all of the data in the drop-down box what I want is a drop-down box only show the front I input format of ABC, and how to make a drop-down box with the rate corresponding to the selected format name (ABC chose format, for example, how to make it corresponds to 123? Because below calculate) O bosses
CodePudding user response:
Even if the "records" save in a text file, you somehow have to ensure that "standard format"!!!!!!!!!
Look at your "record", some "format name" and "rate" the two "key", (also is bad, its name, called "keywords" for now ^_^) Some have only a "format name" without any keywords, nor rate information (of course it's not a problem),
What do you think of that record information, when remembering file data, can facilitate processing!
Was a very simple thing, but because you remember the "mess" and become difficult to deal with, Said a "specific" points, is: Either you put all of the records (is the "text" in a row), unified respectively dubbed "format name" and "rate"; Don't the "key words", or to format the name and code rate information separated by a "special characters", Such as use of es semicolon (assuming the format name will not appear in the "semicolon" character), comma (assuming... Like the previous), Format name will appear in character, this kind of "no crown keyword" circumstances will not be able to as the "separator", Es of space, for example, you are in the format of the name "Half" D1, it obviously can't use it to make separators, After the "format specification", solve your "problem" is simple; And "format name only, no rate", also is not a "problem",