NORMAL      Activates and displays a window. If the window is minimized or maximized, Windows
                        restores it to its original size and position. An application should specify this flag
                        when displaying the window for the first time.

Returns a value greater than 32 if successful, or an error value that is less than or equal to 32 otherwise.
The following table lists the error values.

  0  The operating system is out of memory or resources.
  3  ERROR_PATH_NOT_FOUND   The specified path was not found.
  11 ERROR_BAD_FORMAT       The .exe file is invalid (non-Microsoft Win32 .exe or error in .exe image).
  5  SE_ERR_ACCESSDENIED    The operating system denied access to the specified file.
  27 SE_ERR_ASSOCINCOMPLETE The file name association is incomplete or invalid.
  30 SE_ERR_DDEBUSY         The Dynamic Data Exchange (DDE) transaction could not be completed because
                            other DDE transactions were being processed.
  29 SE_ERR_DDEFAIL         The DDE transaction failed.
  28 SE_ERR_DDETIMEOUT      The DDE transaction could not be completed because the request timed out.
  32 SE_ERR_DLLNOTFOUND     The specified dynamic-link library (DLL) was not found.
  2  SE_ERR_FNF             The specified file was not found.
  31 SE_ERR_NOASSOC         There is no application associated with the given file name extension. This
                            error will also be returned if you attempt to print a file that is not printable.
  8  SE_ERR_OOM             There was not enough memory to complete the operation.
  3  SE_ERR_PNF             The specified path was not found.
  26 SE_ERR_SHARE           A sharing violation occurred.

Examples:

Open a web page in the default browser

  my $exitval = $win->ShellExecute('open','http://www.perl.org','','',1);

Open a text file in nodepad

  my $exitval = $win->ShellExecute('open','notepad.exe','readme.txt','',1) ;

=for comment $Id: per_package_method.tpl,v 1.3 2006/03/16 21:11:13 robertemay Exp $

=head2 Show

B<Show([COMMAND=SW_SHOWNORMAL])>

Shows a window (or change its showing state to B<COMMAND>);

Available B<COMMAND> are:

  0  : SW_HIDE
  1  : SW_SHOWNORMAL
  1  : SW_NORMAL
  2  : SW_SHOWMINIMIZED
  3  : SW_SHOWMAXIMIZED
  3  : SW_MAXIMIZE
  4  : SW_SHOWNOACTIVATE
  5  : SW_SHOW
  6  : SW_MINIMIZE
  7  : SW_SHOWMINNOACTIVE
  8  : SW_SHOWNA
  9  : SW_RESTORE
  10 : SW_SHOWDEFAULT
  11 : SW_FORCEMINIMIZE
  11 : SW_MAX

=for comment $Id: per_package_method.tpl,v 1.3 2006/03/16 21:11:13 robertemay Exp $

=head2 Text

B<Text([TEXT])>

Sets or gets the text associated with a window or control. For example,
for windows, this is the text in the titlebar of the window. For button
controls, it's the text on the button, and so on. Text() and Caption()
are synonymous with oneanother.

=for comment $Id: per_package_method.tpl,v 1.3 2006/03/16 21:11:13 robertemay Exp $

=head2 Top

B<Top([TOP])>

Gets or sets the top co-ordinate of an object, relative to the object's
parent if it has one, or absolute screen co-ordinate if it doesn't.

See also L<AbsTop()|Win32::GUI::Reference::Methods/AbsTop>
See also L<Move()|Win32::GUI::Reference::Methods/Move>

=for comment $Id: per_package_method.tpl,v 1.3 2006/03/16 21:11:13 robertemay Exp $

=head2 TrackMouse

B<TrackMouse([TIMEOUT=HOVER_DEFAULT, EVENTS=TME_HOVER|TME_LEAVE])>

Causes the window to receive messages when the mouse pointer leaves a
window or hovers over a window for a specified amount of time (B<TIMEOUT>, in
milliseconds).

B<EVENTS> can be set to one or more of the following values (ORed together):

 0x0001 TME_HOVER     Makes the window receive WM_MOUSEHOVER messages when the mouse hovers over it.
 0x0002 TME_LEAVE     Makes the window receive a WM_MOUSELEAVE message when the mouse leaves it.
 0x0010 TME_NONCLIENT Specifies that the non-client area should be included when tracking the mouse.
                      The window will receive WM_NCMOUSEHOVER and WM_NCMOUSELEAVE messages depending
                      on whether TME_HOVER and/or TME_LEAVE are set.

See also L<UntrackMouse()|Win32::GUI::Reference::Methods/UntrackMouse>

=for comment $Id: per_package_method.tpl,v 1.3 2006/03/16 21:11:13 robertemay Exp $

=head2 TrackPopupMenu

B<TrackPopupMenu(MENU [, X, Y [, LEFT, TOP, RIGHT, BOTTOM] [, FLAGS [, CODEREF]]])>

Displays the menu B<MENU> at the specified co-ordinates (X,Y) and tracks the
selection of items on the menu. X and Y are absolute screen co-ordinates.

If X and Y are not provided, uses the current cursor position.

If LEFT, TOP, RIGHT and BOTTOM are provided they describe a rectangle in absolute screen
co-ordinates over which the menu will not be drawn (the excluded rectangle).

The following flags can be set (combine flags with bitwise OR (|) )

  0x0000 TPM_LEFTBUTTON      Menu items can only be selected with left mouse button
  0x0002 TPM_RIGHTBUTTON     Menu items can be selected with either left or right mouse button
  0x0000 TPM_LEFTALIGN       Menu is aligned to the left of the given X co-ordinate
  0x0004 TPM_CENTERALIGN     Menu is centered on the given X co-ordinate
  0x0008 TPM_RIGHTALIGN      Menu is aligned to the right of the given X co-ordinate
  0x0000 TPM_TOPALIGN        Menu is aligned above the given Y co-ordinate
  0x0010 TPM_VCENTERALIGN    Menu is centered on the given Y co-ordinate
  0x0020 TPM_BOTTOMALIGN     Menu is aligned below the given Y co-ordinate
  0x0100 TPM_RETURNCMD       TrackPopupMenu returns the selected menu item identifier in the return value
  0x0400 TPM_HORPOSANIMATION Menu will be animated from left to right (ignored if menu fading is on)
  0x0800 TPM_HORNEGANIMATION Menu will be animated from right to left (ignored if menu fading is on)
  0x1000 TPM_VERPOSANIMATION Menu will be animated from top to bottom (ignored if menu fading is on)
  0x2000 TPM_VERNEGANIMATION Menu will be animated from bottom to top (ignored if menu fading is on)
  0x4000 TPM_NOANIMATION     Menu will not be animated and will not "fade" in and out even if menu
                             fading is enabled
  0x0001 TPM_RECURSE         Allows you to display a menu when another menu is already displayed.
                             This is intended to support context menus within a menu. (Windows 2000/XP only)

The default flags are C<TPM_LEFTALIGN | TPM_TOPALIGN | TPM_LEFTBUTTON>

If an excluded rectangle is spefified then the following flags may also be used, and TPM_VERTICAL is added to
the default flags:

  0x0000 TPM_HORIZONTAL      If the menu cannot be shown at the specified location without overlapping
                             the excluded rectangle, the system tries to accommodate the requested
                             horizontal alignment before the requested vertical alignment.
  0x0040 TPM_VERTICAL        If the menu cannot be shown at the specified location without overlapping
                             the excluded rectangle, the system tries to accommodate the requested
                             vertical alignment before the requested horizontal alignment.

If you specify C<TPM_RETURNCMD>, then the menu item ID of the selected item is returned. If an error
occurs or the user does not select an item, zero is returned.
If you do not specify C<TPM_RETURNCMD>, the return value will be nonzero on success or zero on failure.

If B<CODEREF> is provided, then it is a code reference to a callback procedure that will be called for windows
events that occur while the menu is displayed (normally such events are not available, as TrackPopupMenu has
its own internal event loop).  The callback will recieve a reference to the Win32::GUI object used to call
TrackPopupMenu on, and the message code, wParam and lParam of the event that occured. The callback should
return nothing or 1 to allow the event to be processed normally, or 0 to prevent the event being passed to the
default event handler.  See MSDN documentation for SetWindowsHookEx with idHook set to WH_MSGFILTER for
the full gore.

The callback prototype is:

    sub callback {
        my ($self, $message, $wParam, $lParam) = @_;

        # Process messages you are interested in

        return;
    }

=for comment $Id: per_package_method.tpl,v 1.3 2006/03/16 21:11:13 robertemay Exp $

=head2 UnHook

B<UnHook(MSG,[CODEREF])>

Removes a specific code reference from the hooks listing for the given
message, or removes all code references for the given message if no
coderef is specified.

Returns true on success, and false on failure (no such hook).

See L<Hook()|Win32::GUI::Reference::Methods/Hook> documentation for more information on hooks and their
usage.

=for comment $Id: per_package_method.tpl,v 1.3 2006/03/16 21:11:13 robertemay Exp $

=head2 UntrackMouse

B<UntrackMouse()>

Disables the tracking of mouse hover or leave events for a window.

See also L<TrackMouse()|Win32::GUI::Reference::Methods/TrackMouse>

=for comment $Id: per_package_method.tpl,v 1.3 2006/03/16 21:11:13 robertemay Exp $

=head2 Update

B<Update()>

Repaints a window if it's update region is not empty.

see also L<Redraw()|Win32::GUI::Reference::Methods/Redraw>
see also L<InvalidateRect()|Win32::GUI::Reference::Methods/InvalidateRect>

=for comment $Id: per_package_method.tpl,v 1.3 2006/03/16 21:11:13 robertemay Exp $

=head2 UserData

B<UserData([value])>

Sets or reads user data associated with the window or control.

 my $data=$win->UserData();#retrieve any data associated with the window
 $win->UserData('some string');#associate user data to the window

User data can be any perl scalar or reference.

When reading returns the stored user data, or undef if nothing is stored.
When setting returns a true value if the user data is stored correctly, or
a false value on error

If you are writing a class that you expect others to use, then this
method should B<NOT> be used to store class instance data. See
L<ClassData()|Win32::GUI::Reference::Methods/ClassData> instead.

=for comment $Id: per_package_method.tpl,v 1.3 2006/03/16 21:11:13 robertemay Exp $

=head2 Version

B<Version()>

Returns the module version number.

=for comment $Id: per_package_method.tpl,v 1.3 2006/03/16 21:11:13 robertemay Exp $

=head2 WaitMessage

B<WaitMessage()>

The WaitMessage function yields control to other threads when a thread
has no other messages in its message queue. The WaitMessage function suspends
the thread and does not return until a new message is placed in the thread's
message queue.

=for comment $Id: per_package_method.tpl,v 1.3 2006/03/16 21:11:13 robertemay Exp $

=head2 Width

B<Width([WIDTH])>

Sets or retrieves the width of a window.

See also L<Resize()|Win32::GUI::Reference::Methods/Resize>

=for comment $Id: per_package_method.tpl,v 1.3 2006/03/16 21:11:13 robertemay Exp $

=head2 WindowFromPoint

B<WindowFromPoint(X, Y)>

Returns the handle of the window at the specified screen position.




=for comment $Id: per_package_event_section.tpl,v 1.3 2006/03/16 21:11:13 robertemay Exp $

=head1 EVENTS

L<Common events|Win32::GUI::Reference::Events> apply to most windows and controls.





=for comment $Id: pod_postamble.tpl,v 1.2 2005/08/03 21:45:59 robertemay Exp $

=head1 VERSION

Documentation for Win32::GUI v1.06 created 11 Jul 2012

This document is autogenerated by the build process. Edits made here will be lost.
Edit F<docs/per_package.tpl> instead.

=head1 SUPPORT

Homepage: L<http://perl-win32-gui.sourceforge.net/>.

For further support join the users mailing list(C<perl-win32-gui-users@lists.sourceforge.net>) from the website
at L<http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users>.  There is a searchable list archive at L<http://sourceforge.net/mail/?group_id=16572>.

=head1 COPYRIGHT and LICENCE

Copyright (c) 1997..2012 Aldo Calpini. All rights reserved.

This program is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.


