In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly shows you "VB language how to achieve document recognition", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "VB language how to achieve document recognition" this article.
I. document identification
Look at the extension to identify common files in VB:
Vbp extension: VB project file, which can be used to organize the project file structure.
Exe extension: compiles the generated application file that runs the program.
Frm extension: the form file, which holds all the code for the form file.
Tasks in this section:
After clicking the Show form2 form button, a pop-up query window prompts the message "do you really want to open the form2 form?"
Around this task, we expand what we are going to learn today.
Task ideas:
1. Using the function msgbox, select the second argument of the function, and select the type vbyesno of yes or no
two。 Judge whether the result of msgbox click is yes or no by if statement.
The core code to determine whether the click is yes or not (no):
MsgBox ("do you really want to open form2 forms?" , vbYesNo, "message title") = vbYes
Knowledge supplement:
There are two ways to open a click event (take a button as an example):
The first: directly double-click the control, you can automatically generate a click event.
The second: in the generic code interface, find the name of the control, and then find the name of the event.
Second, case study
We first create a test area, this test area to test the feedback results of different temperatures, through such a case, we learn the use of if statements.
Create a test area:
Textbox control: this control is used to enter content, which is in the text property
Val function: this function is used to convert text to numeric values
The val function uses the method val (text content), and the result returns a numeric type.
Notes for comparison in the program:
When making a comparison, be sure to make a numerical comparison. Only the numerical values in mathematics can be compared.
New knowledge:
Judgment learning: using if statements
Use format:
The first method of use:
If conditional content then
Code executed in accordance with the conditions
End if
If (if) the condition is met, then (then), the code that meets the condition is executed.
The second method of use:
If conditional then
Code that meets the conditions
Else
Code that does not meet the criteria
End if
If (if) the condition is met, then (then), the code that meets the condition is executed, otherwise (else), the code that does not meet the condition is executed.
Third, display the button effect of form2 form
After the "Show form2 form" button is clicked, a selection box pops up. If you select the result of "Yes", you can insert a label tag in the form2 form to describe a simple content, such as:
If you select No, the result is as follows:
The code for this section is as follows:
Private Sub Command1_Click () If MsgBox ("do you really want to open the form2 form?" , vbYesNo, "message title") = vbYes Then Form2.ShowElse MsgBox "you missed" End IfEnd Sub
Private Sub Command2_Click ()
Print Val (Text1.Text)
If Val (Text1.Text) > 30 Then MsgBox "too hot" Else MsgBox "temperature is right" End If
End Sub
The above is all the contents of the article "how to realize document recognition in VB language". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.