Class TForm inheritance sample

This commit is contained in:
Antonio Linares
2001-09-01 06:57:49 +00:00
parent 60e30bf17e
commit e93ded168a

View File

@@ -0,0 +1,33 @@
// Inheriting from Class TForm sample
#include "hbclass.ch"
function Main()
local oForm2 := TForm2():New()
oForm2:ShowModal()
return nil
CLASS TForm2 FROM TForm
METHOD New()
METHOD Button1Click( oSender )
ENDCLASS
METHOD New() CLASS TForm2
Super:New()
::cCaption = ::ClassName()
return Self
METHOD Button1Click( oSender ) CLASS TForm2
MsgInfo( oSender:ClassName() )
return nil