Delphi learning

xiaoxiao2021-03-06  18

I have been using C Buider, and has developed a three-layer application system for "Supplier Relationship Management". The company requires the use of Delphi, there is no way to re-learn the Pascal language. If you record the process of learning, then you are called Delphi learning. <1> seems to be inherit form, if you want to overwrite the method, rewrite events or functions, actually report error, don't understand, is inherit. After testing, it is ok, and you can add your method; Procedure TFORM2 .Button3Click (Sender: TOBJECT); Begin Inherited; SHOWMESSAGE ('a'); end; <2> Abstract Methods abstract method is the virtual method or dynamic method, and is not implemented in the statement, but Implemented by its derived class .Procedure;, Abstract <3> Specifies what control creation: Write function is as follows: Function TForm1.createControl (ControlClass: tcontrolclass; const controlname: string; x, y, w, h: Integer: tControl; begin result: = controlclass.create (self); with results do begin parent: = self; name: = controlname; setbounds (x, y, w, h); visible: = true; end; Call: CreateControl (TPAGECONTROL, 'PAGECONTROL1', 10, 10, 100, 20); <4> Object is class is used to verify the actual type of a running control. If ActiveControl is Tedit dam, ActiveControl .SelectAll; <5> Object AS Class AS operator performs an inspected type conversion; column: Procedure TFORM1.BUTTON2CLICK (Sender: TOBJECT); Begin with sender as tbutton do begin Caption: = '& ok'; onclick: = button1click; end; end; or: (sender as tbutton) .caption: = '& ok'; (Sender as tbutton) .onclick: = button1click;

转载请注明原文地址:https://www.9cbs.com/read-67592.html

New Post(0)