Defining Controls:'Defining Controls, platform supportUseNetvarious controls in the environment, using various properties, methods, and EventsDim textbox=createobject("System.Windows.Forms.TextBox") "'setting properties and displaying them in a containertextbox.text=the. NETthe control that comes with it"Textbox.dock = DockStyle.FillContainer Control1.controls.add (TextBox)'--------------------Custom Control Completion---------------------------'--------------------To mount a custom event---------------------------'Control custom events (including control events for the platform itself and things that are fully custom controls)' me. Attacheventhandler (Control Name,"Event name","function Name of the call")'event name, refer to. NETThe events in the development environment. me. Attacheventhandler (Text input Box1,"KeyDown","The text box is pressed")'--------------------Mount Custom Event completion---------------------------'--------------The text box is pressed (in the function to create a " text box pressed ")---------- ' Textbox1_keypress (Objectsender, KeyPressEventArgs e)'of the eventSender corresponds to this . INPUT1 'of the evente corresponds to this . Input2 if This . Input2.KeyValue.ToString () ="All" ThenMsgBox("The enter key has been pressed on the text! ")End If'-------------------------The text box is finished pressing the code-------------------------'------------attach an event to a field on a record part---------------------------'method for mounting events on a field on a record part'For example, setting a field name to display a password and triggering an event after you press ENTERDimmyfield=Recording Parts1.GetFieldControlByFieldName ("Field name")myfield.properties.passwordchar= System.Convert.ToChar (a)me. Attacheventhandler (MyField,"KeyDown","The text box is pressed")'------------Mount event completion for a field on a record part--------------------------- [size=13.3333px] diagram:The original address, http://plat.delit.cn/thread-192-1-1.html reprint please specify the source: the Author: metric Science and Technology www.
Delit. cn
Measure the rapid development platform how to use custom controls and custom events