# .compile-only. # .args. -c -t:winexe -ref:System.Windows.Forms use System.Windows.Forms class MyForm inherits Form cue init base.init .text = 'Click Me' listen .click, ref .handleClick def handleClick(sender as Object, args as EventArgs) print .controls MessageBox.show('You clicked me!', 'Click') def processCmdKey(msg as inout Message, keyData as Keys) as bool is override, protected return base.processCmdKey(inout msg, keyData) class Program def main is shared Application.run(MyForm())