2011年7月29日 星期五

Windows ActivePerl GUI example

參考
http://docs.activestate.com/activeperl/5.10/faq/Windows/ActivePerl-Winfaq9.html
http://search.cpan.org/~jdb/Win32-0.44/Win32.pm

範例:
use Win32;
Win32::MsgBox("Message body",0,"Title");

語法:
Win32::MsgBox(MESSAGE [, FLAGS [, TITLE]])

Create a dialogbox containing MESSAGE. FLAGS specifies the required icon and buttons according to the following table:

        0 = OK
        1 = OK and Cancel
        2 = Abort, Retry, and Ignore
        3 = Yes, No and Cancel
        4 = Yes and No
        5 = Retry and Cancel

        MB_ICONSTOP          "X" in a red circle
        MB_ICONQUESTION      question mark in a bubble
        MB_ICONEXCLAMATION   exclamation mark in a yellow triangle
        MB_ICONINFORMATION   "i" in a bubble

TITLE specifies an optional window title. The default is "Perl".
The function returns the menu id of the selected push button:

        0  Error
        1  OK
        2  Cancel
        3  Abort
        4  Retry
        5  Ignore
        6  Yes
        7  No

沒有留言:

張貼留言