Hello, Win32 GUI(Perl) World!

Posted on 7月 13th, 2012 by cx20

Win32 GUI(Perl)

Win32 アプリケーションは Windows 標準 API である Win32 API を使用した Windows アプリケーションである。
以下は Perl にて Win32::GUI ライブラリを使用した Win32 GUI アプリケーション の例となっている。

ソースコード

use Win32::GUI();
 
$main = Win32::GUI::Window->new( 
    -text => "Hello, world" );
 
$label = $main->AddLabel( 
    -text => "Hello, Win32 GUI(Perl) World!" );
 
$main->Resize(640, 480);
$main->Show();
 
Win32::GUI::Dialog();

実行方法

C:¥> perl hello.pl

実行結果

+------------------------------------------+
|Hello, World!                    [_][~][X]|
+------------------------------------------+
|Hello, Win32 GUI(Perl) World!             |
|                                          |
|                                          |
|                                          |
|                                          |
|                                          |
|                                          |
|                                          |
|                                          |
|                                          |
+------------------------------------------+

Tags:

Categories: Perl, Win32 GUI

コメントを残す

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です

WP-SpamFree by Pole Position Marketing