First, the design of the cover is like this, first appear a form, the above is the pattern you like. Then there is a boat that travels from left to the right. On both sides, the screen is moved from both sides. The specific method is to load a pre-selected background pattern into a cover form, and the form is named CAI. The pre-fabricated bitmap "joy", "welcoming" and ship type are added to the three image controls (iMage), respectively. The three images are then placed in the initial position (ie the pattern is just in the form of the form) and sets their visual attributes to "false". The procedure is as follows:
SUB FORM_LOAD ()
Cai.show 'Display Cover Form
DIM I 'defines variables
Image3.visible = True 'Ship type image control
A1: if image3.left <6120 then
'6120 is the coordinate of the ship to the right of the screen, this value can be selected
Image3.move image3.left 50
'Move this image control, if it is slow, change the moving value
Goto A1
END IF
Image1.visible = true '"joy" word appears
A2: if Image1.left <2120 the
'2120 is moving to the middle of the screen to the screen
Image1.move image1.Left 50 'Move this image control
Goto A2
END IF
Image2.visible = true '"Welcome" word
A3: if Image2.Left> 5420 THEN
'5420 is moving to the middle of the screen to the "Welcome"
Image2.move image2.Left-50 'Move this image control
Goto A3
END IF
For i = 1 to 10000
'Make the form pause for a period of time, the length of the time can be achieved by changing the number of cycles.
Next i
Menul.show 'Display Program Main Form
Unload CAI 'Uninstall Cover Form
End Sub
Second, simple "animation"
After clicking on a 3D button, the screen is expressed in parallel into a glass tube in parallel, and there is a scatter center in the tube, and some light is reflected back to the initial end of the tube. The procedure is as follows:
SUB Command3dl_click ()
DIM I, J, K, M, N 'Define variables
For i = 2080 to 5520
'Show out three lines until the scattering center in the image, color is black
LINE (2080, 2760) - (i, 2760), RGB (0, 0, 0)
LINE (2080, 2860) - (i, 2860), RGB (0, 0, 0)
LINE (2080, 2660) - (i, 2660), RGB (0, 0, 0)
Next i
For J = 5520 to 4800 Step-1 'reflected rays first shot on the tube wall
LINE (5520, 2760) - (J, 2760- (5520-J) *. 33333333), RGB
(255, 0, 0) 'reflecting light, color is red
LINE (5520, 2660) - (5520 (5520-J), 2660), RGB (0, 0, 0)
LINE (5520, 2860) - (5520 (5520-J), 2860), RGB (0, 0, 0)
'There are no two lights in the scatter center, which is black, continue to advance.
NEXT J
For K = 4800 to 3360 Step-1 'reflected light in the tube wall
LINE (4800, 2520) - (k, 2520 (4800-k) *. 33333333),
RGB (255, 0, 0) 'reflecting light, color is red
Line (6240, 2660) - (6240 (4800-K), 2660), RGB (0, 0) - (6240, 2860) - (6240 (4800-K), 2860), RGB (0, 0, 0)
'There are no two lights in the center of the scatter, color is black
Next K
For m = 3360 to 2080 Step-1 'reflected rays third time shot on the tube wall
LINE (3360, 3000) - (M, 3000- (3360-m) *. 33333333),
RGB (255, 0, 0) 'reflecting light, color is red
Next M
End Sub
Third, the back cover
The cover is designed to appear all black screens, then gradually pulled out the words of the "goodbye" of the white red word from top to bottom. First make a BMP map in the drawing board first, and write "goodbye". Then add a full-screen Picturel to a BYE form, and install BMP map. The procedure is as follows:
SUB FORM_LOAD ()
DIM I 'defines variables
Bye.show '
Unload menu1 'Uninstall the main menu
Al: if Picture1.Height <7130 The '7130 is the height of the figure
Picturel.height = Picture1.Height 50 'drop-down screen
Goto al
END IF
For i = 1 to 20000 'makes the form for a period of time
Next i
End 'ends all operations
End Sub
Use Visual Basic to make the command line software to turn to Windows
As we all know, Windows has become a mainstream operating system today, but it has become the mainstream operating system today, but because of its more complicated, there are many user common tools and applets that can only run in the DOS environment. Causes frequent switching of Windows and DOS, making the working lack of continuity and low efficiency. What is the way to solve this problem? Waiting for the for Windows version of the market, but will still be repeated. According to the author's observations, some of the common tools are command line software, which can be used to adapt to the for Windows version using VB. First, due to the simple and easy to use VB, it makes the interface design of Windows is very simple and intuitive. Therefore, it is easy to translate the command option, the switch, etc. to the corresponding graphical interface (such as a check button, etc.). Second, because VB provides the user with the shell function, it is also very simple to call the command call. Through Shell, you only have interface, core or original tools under DOS. The format of its function is as follows:
Shell (Command String <, Window Type>)
Command strings are specific executed commands (such as string "Arj E A: User.arj C: / User") Confisible books. As for the window type, it can be default. Finally, it will only be noted that before the SHELL execution function, it is necessary to detect the parameters of the command line, if the source file given before execution is preceded to ensure that the expected result is achieved. The author used VB to adapt the Arj for Windows version, and the result is imagined. I hope everyone can turn their hands to turn to Windows.
Finally, pay attention to the principle of interface design.
The emergence of the general graphical interface of Windows makes computer users do not have to use specialized learning, they can use a variety of Windows software. Not only that, it is still a standard that the program designer must follow when designing the Windows program interface, which greatly reduces the burden of program designers, enabling them to solve the problem and implementation of the main energy.
Visual Basic (hereinafter referred to as VB), more simplifies the design of the Windows program interface, only requires a very small amount of code, you can implement the interface of standard Win-DOWS applications. However, if you don't understand the principles of the Windows program interface design, or don't familiarize with the skill of VB programming, it is difficult to design and implement interfaces that are both a general standard and a featured interface. Principle of interface design
Interface design has general principles, the most important: 1. Interface has consistency. The principle of consistency is the easiest to violate in interface design, and it is also easier to modify and avoid. For example, you must use the same terms in the menu and online help; the dialog must have the same style. 2. There must be shortcuts in common operations. The usage frequency of common operation should be reduced, and the length of the operation sequence should be reduced. For example, set shortcuts for files for files such as open, store, and save, etc. Make common operations with shortcuts, not only improve the user's work efficiency, but also makes the interface simply and efficiently. 3. Provide simple error handling. The system must have the function of error handling. When an error occurs, the system should detect errors and provide simple and easy to understand error handling functions. The status of the system does not change after the error occurs, or the system needs to provide an error recovery. 4. Provide information feedback. An important operation of the operator must have information feedback. Feedback to usual operations and simple operations can not be required, but the system should provide feedback on the information of uncommon operation and critical operations. 5. Operation can be reversible. The operation should be reversible. This is quite useful for operators who do not have expertise. The reversible action can be a single operation, or a relatively independent operation sequence. 6. Design well online help. Although online help is not a less than skilled users, it is very important for most unuspriced users.
Menu design principles and programming
The menu design has the following general principles: Organize the menu according to the functionality of the system. To choose a wide-shallow menu tree, not a narrow and deep menu tree. Packet according to the meaning of the menu option; and sort by a certain rule. The title of the menu option should strive to make a shortness of literature, clear meaning, and it is best to start with keywords. Common options To set shortcuts. Combined with the above principles, menu programming has the following techniques and techniques: the grouping of menu options In VB, the packet of the menu option is separated through the menu bar. Add a Menu item that is "-" in a certain location of the menu, which behaves on the menu as a horizontal line. In many cases, the same function menu can be divided into several groups in the functionality of the menu option, and the split horizontal line can be used to implement the packet of the menu item. Open the Menu Design Window for the Menu Design Window, you should select one in this table for each menu option. It should be noted that the shortcut key of the menu or the top menu with the submenu cannot be defined. According to the interface design principle of Windows, the shortcuts of the top menu are the Alt letter key. For some common function menu items, there is a customary shortcut. For example, the file is opened with CTRL O, the file storage is used to print Ctrl P, and so on. After defining the shortcut for the menu option, the text representation of the shortcut key will appear later on the menu. Menu options and disabilities, visible and hidden in order to indicate some of the special features of the menu option, you might use to use the menu options and disable, visible and hidden properties. This option should be prohibited when the function represented by an option cannot be implemented because some reason is not implemented. The enable and disable of the menu option is achieved by changing the enabled attribute of this option. For example, it is assumed that the menu option is mnuname, and the option can be disabled: mnuname.Enabled = false, hiding an option, you can use: mnuname.visible = false, make a hidden option to recover, you can use Mnuname. Visible = True menu item hidden and recovery can be used in the implementation of the dynamic menu. The dynamic load menu item of the menu item is not fixed by the number of menu items and can be dynamically loaded when needed. The simplest example is a list of recently opened files in the file menu. Before the file is opened, the list is empty and does not appear in the file menu; after opening a file, the list is no longer empty, and the menu item that represents the opened file appears in the file menu. In the above example, the subscript property (INDEX), the visual property (Visible), the Title Properties (CAPTION), the Title Properties (CAPTION), the Title Properties (CAPTION), the Title Properties (CAPTION), the Load Method are used. The specific implementation process is as follows: Add a menu item in the File menu, the title is arbitrary, and assumes that the Name property of the menu item is OPENED_FILES_LIST; change the visible properties of the menu item Opened_Files_List, make OPENED_FILES_LIST.Visible = false Change the menu item OPENED_FILES_LIST subscript Attribute, make OPENED_FILES_LIST.INDEX = 0 to control the dynamic load of the menu item open_files_list in the program. Suppose the file name of the opened second file is displayed, and the file name is stored in an array OPENED _FILE_NAME. It should be noted that the Load method cannot be used for a menu item with a subscript 0. Because the menu item has been loaded into the memory when executed; in addition, the "&" character in the menu item has a special meaning, its role is to display the property string At the same time, "&" itself does not display "&" itself, and the characters that keep up "&" have underscores, and the characters become hotkeys. If the menu item that is not 0 is no longer required, in order to reduce the occupation of memory resources, you can use the un-load method to remove it from memory; in the same, you cannot use unload to remove the menu item with 0. The menu for the pop-up menu is designed in the Menu Design window is a drop-down menu. The drop-down menu is the menu that the user can select after the top menu bar at any time, and the pop-up menu is the menu that appears after the mouse button in a certain area of the program interface. In some cases, the pop-up menu makes the implementation of the system function more simple and efficient, and it is more useful to use it.