Friends of VB Source Code are a good assistant developed by VB software, which can regulate the format of source-developed formats, and improve programming speeds, which is a good tool. It is followed by the API browser, and the Ye Fan Software Series family is another heavyweight VB program development auxiliary software. There are several functions: 1. Procedure Note Automatically generate; 2. Variable automatically add prefix (in line with Hungarian naming rules, you can customize); 3. Command word automatic replenishment function (can be customized); 4, code format Automatic finishing; 5, source information statistics; 6, VB engineering automatically save (time interval can be set); 7, intelligent query (can be visually switched); 8, intelligent positioning (can be visually switched to tag position).
[Download link] ---------------------------------------------- -
Http://www.softreg.com.cn/shareware_view.asp?id=/6fae6d34-825b-4862-b771-b3ea1bd8a417/
【Function Description】---------------------------------------------- -
First, basic configuration
1, Author: unregistered Edition, Personal Edition, Professional Edition can not configure this option, the information derived from the registration information of those who use the software; or custom version of Enterprise Edition, the author name can be set according to actual. 2, company: For unregistered, personal version, professional version, enterprise version of this option is not configurable, information comes from corporate information in registration information; for customized version, the company name can be set according to actual. 3, date format: This format is "Module Description", "Function Description", "Error Process", etc. Displayed in the date format display; Note: This date format setting must be valid correctly, otherwise an unpredictable error will occur. 4. Profile: This configuration file defaults to the current plugin where the file can be set. You can also customize different format templates by selecting different profiles. 5, VB engineering file Timed Save: After the function is enabled, the VB project file is automatically saved according to the set save interval. 6, function hotkey is valid: After this function is enabled, all of the hotkey is effective. 7, the VB IDE mouse wheel is valid: After the function is enabled, the VB editor supports the mouse wheel function.
Second, add a module description
Enter Edit Mode 1, add a module to explain the [Add Module Description] icon in the menu bar or press the hotkey Ctrl Alt T, that is, add the following information on the top of the module: '********** *********************************************************** ************* ** Module Name: Form1 - form1 Automatically fills in the name of the module '**: Ye Fan Software Copyright 2003 - 2004 (C) - Ye Fan Software Registered company name '** Creation: Ye Fan registered by the author' ** Japan: June 26, 2003 - Automatically fill in the current date '** Modify:' ** Japan : '** Description:' ** Edition: v1.0 - Automatically fill in the current version (after saving) '****************** *********************************************************** *** 2, configuration module description style ********************************************************* ********************************** Module name:% moduleName% ** said:% company% copyright All% Dateyear% (C) ** Create:% Writer% ** Recent:% DATE% ** Modifier: ** Japan: ** Description: ** Edition:% Version% **** *********************************************************** ****************** Keyword description: 1,% moduleName%: module name, actual use, the system automatically uses the actual module name to replace; 2,% Company% : The company name, actual use, the system automatically uses the registered company name replace; 3,% Dateyear%: Version All years, the system is started in the previous year, continuing a year of format, such as 2004-2005; 4, % Writer%: Software authors, system automatic name replacement with registered software users; if the author can modify . 5,% date%: Add date, actual use, the system automatically uses the current date replacement; Note: The date format is the date format set in the basic configuration. 6,% version%: Software version, actual use, the system automatically uses the actual software version; note that the version is displayed by the release of the project file. Third, add a function description
1. Add a function description first put the cursor to the target function or process, then click the [Add Function Description] icon of the menu bar or press the hotkey Ctrl Alt P, which is added as the following information on the top of the function or process: i, function (below the function description is automatically filled)
'********************************************************** ************************ The ** function name: add '** input: a (integer) -' **: b (Integer) - '** output: (Integer) -' ** function description: '** Global variable:' ** Call Module: '** Author: Ye Fan' ** Japan: June 26, 2003 ' ** Modifier: '** Japan:' ** version: v1.0 '************************************ *************************************************************** Private Function Add (A as Integer, B AS Integer AS Integer Add = A Bend FunctionII, the process (the following function description is automatically filled out)
'********************************************************** *********************** ** function name: form_mousedown '** input: button (integer) -' **: shift (Integer) - '**: x (Single) -' **: y (single) - '** output: no' ** function description: '** global variable:' ** Call Module: '** author: Ye Fan '** Japan: June 26, 2003' ** Modified: '** Japan:' ** Version: v1.0 '************* *********************************************************** ********* Private Sub Form_MouseDown (Button As INTEGER, Shift As INTEGER, X AS
SINGLE, Y askLE) END SUB
2, the style of configuration function description *************************************************************** ******************************** Function name:% functionName% ** input:% input% ** output :% OUTPUT% ** Function Description: ** Global Variable: ** Call Module: ** Author:% Writer% ** Recent:% DATE% ** Modifier: ** Japan: ** Edition: % Version% *************************************************************** ************************* Input prefix: When there is a number of input information, the second line starts the parameter description of the annotation information. Keyword Description: 1,% functionName%: Function name, actual use, system automatically uses actual function (or procedure) name replacement; Replace; when there is a plurality of input parameters, the annotation information before the second row starts is the content in the "input prefix". 3,% OUTPUT%: Enter information; 4,% write%: software author, system automatic name replacement with registered software users; if it is an enterprise user, the author can arbitrarily modify. 5,% date%: Add date, actual use, the system automatically uses the current date replacement; Note: The date format is the date format set in the basic configuration. 6,% version%: Software version, actual use, the system automatically uses the actual software version; note that the version is displayed by the release of the project file. Fourth, add an error handling
1. Add the error handling information to put the cursor to the target function or process, then click the [Add error handling] icon in the menu bar or press the hotkey Ctrl Alt E, then fill in the error processing code according to the configuration. I, error handling mode error handling method has four types (can automatically fill in the corresponding code according to the function or process): 1), jump out:
'Open error handling trap on Error Goto Errgoto' ------------------------------------------------------------------------------------------------------------------------------------------------ ------------'------------------------------------- --------------- EXIT SUB '----------------------------- Errgoto:
2), continue: resume 3), skip: Resume next 4), end: END II, save the error message in the format of the data file error message: Time, information category, error message, module, project name Private function add (A as integer, b as integer) AS integer
ON Error Goto TOEXIT 'Open Error Trap' ----------------------------------------- ----------- Add = a b '--------------------------------- ------------------- EXIT FUNCTION '---------------------------------------------------------------------------------------------------- -ToExit: DIM LNGERRFILANO AS INTEGER 'Free File Number' Save Error Information in File LNGERRFILENO = FreeFile () Open app.path & "/yferrmsg.txt" for append as lngerrfileno Print #LNGERRFILENO, "Errmsg:" & format $ (Now, "YYYY-
MM-DD HH: MM: SS ") &", "& Err.Number &", "& Err.Description &", Add, Form1 "Close #INTERRFILENOrSume Next
END FUNCTION
III, custom error handling statement error message format: Time, Information Category, Error Message, Module, Engineering Name Private Function Add (A AS Integer, B AS Integer) AS Integer
ON Error Goto TOEXIT 'Open Error Trap' ----------------------------------------- ----------- Add = a b '--------------------------------- ------------------- EXIT FUNCTION '---------------------------------------------------------------------------------------------------- -ToExit:
Debug.print "error occurrence time:"; Format (now, "YYY-MM-DD HH: MM: SS") debug.print "Error type:"; Err.Numberdebug.print "error message:"; Err .DescriptionDebug.print "Error function name: add" debug.print "Error module name: form1"
End function 2, style debug.print "error occurrence time:"% DateTime% debug.print "error Type:"% errortype% debug.print "error message:"% erriDescription% debug.print "Error Function Name:% ERRORSOURCE% "Debug.print" Error Module Name:% SystemTitle% "Keyword Description: 1,% AppPath%: Engineering Path, actual use, system automatically uses actual path information; 2,% datetime% : Error Date, actual use, the system automatically uses current date replacement; Note: The date format is the format configured in the date type. 3,% errorType%: Error type, actual use, system automatically use err.Number to replace; 4,% errotescription%: error message, actual use, system automatically use err.description replacement; 5,% errorsource%: Error Source When actually used, the system automatically replaces the function or process name; 6,% systemtitle%: system title, actual use, the system automatically uses the module name where the function or process is replaced; five, code format finishing
1, code format to consolidate the [code format finishing] icon or press hot button in the menu bar: Ctrl Alt C or module in the function, you can complete the format of the VB code. Note: When you select a function, enter the cursor to be valid within the corresponding function. Code Before: Private Function Add (A as Integer, B AS Integer) AS INTEGERON ERROR GOTO TOEXIT 'Open Error Trap' ----------------------------------------------------------------------------------------------------------------------------------- ------------------------ if a = b1nadd = A B VAL (Left ("9999", 2)) end ifa = 0: B = 0 '-------------------------------------------- --Exit function '---------------- TOEXIT: Debug.print "error occurrence time:"; Format (now, "YYYY-MM-DD HH: mm: SS") Debug.print "Error type:"; err.numberdebug.print "error message:"; err.descriptiondebug.print "Error function name: add" debug.print "Error module name: Form1" resume nextend function code (Performed accordingly: Private function add (a as integer, b as integer) AS INTEGER
ON Error Goto TOEXIT 'Open Error Trap' ----------------------------------------- ------- IF a = b THEN
Add = A B VAL (Left $ ("9999", 2)) - Added "$" symbol END IFA = 0 - Branch B = 0 '------------- ----------------------------------- EXIT FUNCTION '------------ ----
TOEXIT:
Debug.print "error occurrence time:"; Format $ (now, "YYYY-MM-DD HH: MM: SS") debug.print "Error type:"; err.numberdebug.print "error message:"; Err.DescriptionDebug.print "Error function name: add" debug.print "Error module name: Form1" Resume Next
End function 2, configuring code format finishing mode i, enable [string command Add "$" feature]: Add $ with a string command, you can enter a new keyword in the edit box, or delete the corresponding keyword, You can also set the validity of the keyword. II, function in the function: After setting, according to the toolbar icon code, the coded range is for the current function, otherwise the entire module is corresponding. III, separated by ":" to ":", after enabling, the separated code is separated in ":".
6. Intelligent Find / Smart Positioning
1. Smart Find the [Smart Find / Position] icon or pressing the hotkey Ctrl Alt F, display the smart lookout window: Basic interface: Select translucent (valid for the version of Win2000), and hidden settings area The following interface is the "VB Intelligent Find" is the "Finding Function" enhanced version of VB editing. Its biggest feature has two: 1. All matching data is found once and displayed in the List box. 2. Double-click the option to click the LIST box, enter the cursor directly to the corresponding code row. 2, intelligent positioning press hotkey Ctrl Alt D, display smart positioning window: Basic interface: (You can also set the form translucent (value for Win2000 or more)) "VB Intelligent Location" is a "bookmark" under VB editing Function "Enhanced version, there are two features: 1, display all bookmarks in the list box. 2. Double-click the bookmark of the LIST box and enter the cursor directly to the corresponding code row. Note: When setting the bookmark, it must be set via the "VB Intelligent Location" small banner setting, and it is also the same.
Seven, keyword automatic complement
1, keyword automatically replenizes the configured keyword, after entering the keyword (after entering the car), the system automatically adds a corresponding keyword input keyword automatic keyword Do Loop if end if while Wend For next ... 2, keyword configuration can add and delete the corresponding keyword, in addition to this, you can set the validity of the keyword. Note: Function Description: Enter -> Enter the feature After enabled, you will be able to add input prefix information to the function described in the function.
Eight, keyword automatic replacement
1, the keyword automatically replaces the configuration keyword, after entering the keyword (after entering spaces, after entering the return), the system automatically replaces the keyword entered into the keyword entered into the keyword entered into the keyword EXF EXIT FUNCTION PUF public PUBLIC Function ... 2, keyword configuration can add and delete the corresponding keyword, and set the validity of the keyword. Note: The space line: The space bar -> tab function is enabled, enter the space bar in each blank line in each space, which is equivalent to pressing the Tab. Nine, keyword automatic match
1. Keyword hot keys corresponding to positioning: Ctrl [Forward Matching Hotkey: Ctrl ] Backward look 2 In addition to this, you can set the validity of the keyword.
Ten, the variable automatically adds prefix
1, the variable automatically adds the prefix to the configuration of the configuration, automatically adds a corresponding prefix when the variable is named: Add before adding (after entering the Enter) Dim Data AS String Dim String Dim Num As Long Dim LNGNUM AS Long DIM INDEX AS INTEGER DIM INTINDEX AS INTEGER ... Note: Some special variables, such as I, J, K, etc., can be set to variables that are not prefixed. 2, prefix format configuration (1) Variable prefix setting: You can add and delete the format of the variable prefix, and you can set the validity of the specified variable prefix. (2) Variables that are not prefixed: You can add and delete the variable name that does not add, and you can also set the validity of the specified variable.
XI, source code information statistics
Press the scan button to display all open module information of the entire project according to different options (various function declarations). (The module to be scanned) can be selected. Press Save File to save the scan information in the file. Option Description: 1. Display Module Details: After enabling, the statistics display module details. 2. Display function details: After enabling, the statistics display the comment information on the top of the function. 3, display code amount, note quantity: display the number of lines of code and number of comment lines.
Show example: %%%%%%%%%%%%%%%%%%%%%%%%%%% [project name ] MMOUSE [file name] mouse.vbp %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% ================================================= =================== [module name] MOUSE [file name] mouse.ctl =================== ================================================ ** *********************************************************** ********************* ** function name: TMRMouse_timer '** input: no' ** output: no '** function description: Roller Trigger Event' ** global variables: '** call module:' ** author: Ye fan '** date: December 31, 2002' ** Modifier: '** date:' ** version: version 1.0 '** *********************************************************** ********************* Private Sub TMRMOUSE_TIMER () Function Total number: 20 '******************* *********************************************************** ***** '** Function Name: UserControl_Resize' ** Enter: No '** Output: No' ** Function Description: Limit the control size in development mode '** global variable:' ** Call Module: '** author: Ye fan' ** date: December 31, 2002 '** Modifier:' ** date: '** version: version 1.0' ************* *********************************************************** ********** Private Sub UserControl_resize () Function Total number: 18 ... ======
============================================================================================================================================================================================================= ========== Total number: 103 code line number: 23 empty line number: 5 Note Your number: 78 Note Run / Code function: 339.13% =========== ============================================================================================================================================================================================================= ===== Function total: 5 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%% registered users can use the following features: Personal Edition: 1, Module Description Format Custom Function 2, Function Description Format Custom Function 3, Error Processing Format Custom Function (Part 2) Professional Edition: 1 , VB function Timer save function 3, hotkey function is valid (support hotkey) 4, error processing can be configured save file information function 5, error processing processing information can be customized to function 6, code finishing custom function 7, automatic replenishing custom function 8 , Automatic replacement function 9, automatic matching function 10, intelligent positioning function Enterprise version: 1, full professional version of the function 2, variable name customization function 3, source code statistics function 4, can set software developer customized version: according to needs customization.