In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
Today, I would like to talk to you about how to use doevents, many people may not know much about it. In order to make you understand better, the editor has summarized the following contents for you. I hope you can get something from this article.
How to use doevents
Doevents
Transfer permissions to the operating system to handle event use. The advantage is that the system interface will not stutter.
Usage scenario: we generally deal with a large amount of data, causing the system to get stuck on the current interface. Considering the user experience, we need to use doevents.
Doevents, pay attention.
1. When using doevents, if the event is not over, turn it off immediately, the program is still in execution, and there is no really critical application.
2. When dragging the system interface, doevents will not refresh the value that the program needs to refresh.
Solutions to prevent doevents from shutting down processes
Used in the form_unload event, that is, before the end of the form
1. Add a tag that ends the loop to the loop
2. End with end
Classroom summary
1. Learn to use doevents and understand the application scenario, which can be used when reading large files
2. Master the solution to the process retention caused by doevents
3. When executing other events in the system, the corresponding interface will not be refreshed:
Source code:
Dim flag As BooleanPrivate Sub Command1_Click () flag = TrueDim i As DoubleWhile flagText1.Text = Val (Text1.Text) + 1DoEventsWendEnd Sub
Private Sub Form_Unload (Cancel As Integer) flag = FalseEndEnd Sub
After reading the above, do you have any further understanding of how to use doevents? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.
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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.