From e93ded168a0159559b1ff34db78a750f6426f85e Mon Sep 17 00:00:00 2001 From: Antonio Linares Date: Sat, 1 Sep 2001 06:57:49 +0000 Subject: [PATCH] Class TForm inheritance sample --- harbour/contrib/hgf/win32/tests/form2.prg | 33 +++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 harbour/contrib/hgf/win32/tests/form2.prg diff --git a/harbour/contrib/hgf/win32/tests/form2.prg b/harbour/contrib/hgf/win32/tests/form2.prg new file mode 100644 index 0000000000..cace200395 --- /dev/null +++ b/harbour/contrib/hgf/win32/tests/form2.prg @@ -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 \ No newline at end of file