Add a "Cumulative" dialog box to your application

Source: Internet
Author: User
Tags access database

At present, almost all commercial software at the start of a "cumulative" dialog box, which shows a general display of the use of the software skills, users can also browse through all of the techniques.

Here's how to implement this feature in Visual Basic 5.0:

The key is that there are three problems to be solved: first, how to save the technique information, how to read it randomly, and how to control whether the boot is displayed or not.

To solve the first problem, there are two ways: one is to save the skill information in a text file, a line to save a skill, and then use the VB file read and write command for reading; another solution is to use VB's own Access database, save the tip information in a table in the database, and then read the information from it. This article uses the second method to save skill information.

The second problem is easy to solve, we can use the random number function of VB to produce random number as to read the skill number, and then the database object Move method to navigate to the technique, and the field attribute to display it.

There are two ways to solve the last problem: one is to use a separate file to save a tag, each time you start to check the tag, and then based on the value of the tag to determine whether to display the "Cumulative" dialog box; another idea is more skillful, we can use the Win95 system registry, To create an application project in the registry, to save the markup that is displayed, check the tag first when it is started, and simply modify the value of the tag when the user clicks the check box button, all of which can be achieved simply by using a few commands in VB about the system registry. This article uses the second method to realize, everybody may by the way from the middle school to use the VB to access the system registration form.

1. Create a form

Add a standard form to your application's engineering, where you place a PictureBox, a checkbox, two labels, and three CommandButton, and the associated property settings for these controls are shown in the following table.

2. Building Skills Database

Generate an Access database named "Mymdb" with VB "visual Data Manager"

(If the application itself already has a ready-made database, you can use it directly, the name does not need to change, a new table in the database, the table named "Tips", the table contains only a variable-length text-Type field, the field name is tip, the length can be based on the circumstances, set to 50. After the table is built, enter a number of records in it (there is a Tips.txt in the Win95 directory, with a lot of technical information to pick from, and add some of the application-related how-to tips to form your own skills database). Specific code slightly.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.