Code Writing

Operate Selection

You can simply use mouse to click and drag to cross the area and drop to make the crossed area as a selection, whatever any codes.

The following picture shows a selection of function.

EPL

 

To Copy the selection to clipboard, you can click “Edit” ->”Copy” menu, or simply press “Ctrl + C” keys”.

To Paste the already copied selection or text in clipboard to current editing position, you can click “Edit” ->”Paste” menu, or simply press “Ctrl + V” keys.

To Cut the selection to clipboard and delete it, you can click “Edit” ->”Cut” menu, or simply press “Ctrl + X” keys.

To Delete the current activated selection, you can press “Delete” key.

The “Edit” menu is in the picture below

EPL

Comment

To insert a comment code line or ignore a code line, you can place “’” character before the code. As default, the commented code line will be displayed in green color. The following picture shows a commented code lines.

EPL

To cancel the pre-commented code line, you just delete the “’” character in front of the code line.

To comment multi-code lines, you can select all the code-lines as a selection, and click “Edit” ->”Comment Selection” menu, or simply press “Ctrl + K” keys.

To uncomment multi-code lines, you can select all the codes lines as a selection, and click “Edit” ->”Uncomment” Selection” menu, or simply click “Ctrl + M” keys.

You can also freely comment on the element that named Comment, such as comment element of Module, Class, DLL Function, Function, Parameter, Variables, Resource, Constant, etc. See pictures below

EPL

Comment on the Function

EPL

Comment on the Constant

EPL

Comment on the Global Variable

Notice that, the commented code line can’t be executed when the application is running, it will be ignored.

Parameter

To add a new parameter for a function or class method, you can click on the function or method name, and press Enter key to add, if you want to add more parameters, and keep to press the Enter key.

To delete a parameter of function or class method, you can delete it as delete a selection, see previous content.

Notice that, you can’t change any pre-defined elements of event-process function in form module, also include parameter.

Module

To add a new local variable to a module, you can press Enter key on the module name. After add a new local variable, you must specify a meaningful local variable name for it. You can also specify a data type of the local variable on Type element. You can also specify array attribute on the Array element, for details about Array, please see Variable chapter.

The following picture shows local variable called “m_str”, and its data type is String.

EPL

To add a new function to the current active module, you can click “Insert” ->”Function” menu. After add a new function, you must specify a meaningful name for it, you may also use the default function name. You can also specify a data type for return type element. To add parameters to the function, see previous content. For details about function, please see Function chapter.

The following picture shows a function, and it returns a Integer type value, and has two parameters.

EPL

To delete a function of a module, you can delete it as delete a selection, see previous content.

To delete a local variable of a module, you can delete it as delete a selection, see previous content.

Notice that, the module can be form module or user-defined module.

Class

To add a new method to a class, you can click “Insert” ->”Function” menu. After add a new method, you must specify a meaningful method name for it, you may also use the default method name. You can also specify a data type for return type element. And you can also check/uncheck the Public element to set the method public or not.

The following picture shows a method called “MyMethodName”, and it must return a Integer type value, and has public attribute.

EPL

To add a new Private Member to a class, you can press Enter key on the class name. After add a new Private Member, you must specify a meaningful Private Member name for it. You can also specify a data type of the Private Member on Type element. You can also specify array attribute on the Array element, for details about Array, please see Variable chapter.

Notice that, the Private Member can be used only in the whole class, just like a local variable of a module.

To delete a method of a class, you can delete it as delete a selection, see previous content.

To delete a Private Member of a class, you can delete it as delete a selection, see previous content.

Global Variable

To add a new Global Variable to application, you can click “Insert” ->”Global Variable” menu. After add a new Global Variable, you must specify a meaningful Global Variable name for it. You can also specify a data type of the Global Variable on Type element. You can also specify array attribute on the Array element, for details about Array, please see Variable chapter.

The following picture shows two global variables. The first variable called “g_str” and it’s String type. The second variable is two dimensional array called “g_nIndex” and it’s Integer type.

EPL

Notice that, the Global Variable can be used in the whole application

To delete a Global Variable, you can delete it as delete a selection, see previous content.

Data Type

To add a new user-defined data type to application, you can click “Insert” ->”Data Type” menu. After add a new Data Type to application, you must specify a meaningful Data Type name for it. You can move the caret on the definition of the Data Type and press Enter key to add more member to the Data Type. You must specify meaningful member names for every Members of the data type. You should also specify a data type of the member on Type element. You can also Specify array attribute on the Array element, for details about Array, please see Variable chapter.

The following picture shows an user-defined data type called “MyDataType”, and it has two members. The first member called “str”, and it’s String type. The second member called “nIndex”, and it’s Integer type.

EPL

To delete a member of data type or the full data type, you can delete it as delete a selection, see previous content.

Notice that, the user-defined data type can be used in the whole application.

Constants

To add a new constant to application, you can click “Insert” -> “Constant” menu. After add a new Constant to application, you must specify a meaning Constant name and Constant value.

To delete a Constant, you can delete it as delete a selection, see previous content.

Notice that, the constants can be used in the whole application.

DLL Function

To add a new DLL Function to application, you can click “Insert” ->”DLL Function” menu. You must specify every elements to fit the prototype of the DLL function. For details about DLL Function, please see “Windows DLL” chapter.

The following shows a DLL Function, the ShellExecute function is same as same-name WIN32 API function.

EPL

To delete a DLL Function, you can delete it as delete a selection, see previous content.

Notice that, the dll functions can be used in the whole application.