November 2002
Intermediate to advanced
560 pages
11h 16m
English
The example program in Listing D.3 implements a simple Windows Forms application. The HelloWorldForm class inherits from the System.Windows.Forms.Form base class. It adds a text box and a button to the form. When the user clicks the button, a message box displays the text from the text box.
package HelloWorldForm; use strict; use PerlNET qw(with AUTOCALL); use namespace "System"; use namespace "System.Windows.Forms"; use namespace "System.Drawing"; =for interface [extends: Form] [STAThread] static void Main(); private field TextBox textBox; private void Click(any sender, EventArgs Args); =cut sub Main { my $self = HelloWorldForm->new; Application->Run($self); } sub HelloWorldForm { my $this ... |
Read now
Unlock full access