Spread Windows Forms 6.0 Product Documentation
ShowPopup Method
See Also  Support Options
FarPoint.Win Assembly > FarPoint.Win Namespace > PopupWindowHelper Class : ShowPopup Method


owner
Main form which owns the popup
location
Location relative to the screen to show the popup at.

Glossary Item Box

Shows the specified Form as a popup window, keeping the Owner's title bar active and preparing to cancel the popup should the user click anywhere outside the popup window.

Typical code to use this message is as follows:

               frmPopup popup = new frmPopup();
               Point location = this.PointToScreen(new Point(button1.Left, button1.Bottom));
               popupHelper.ShowPopup(this, popup, location);
            

Put as much initialisation code as possible into the popup form's constructor, rather than the System.Windows.Forms.Form.Load event as this will improve visual appearance.

Syntax

Visual Basic (Declaration) 
Public Sub ShowPopup( _
   ByVal owner As Control, _
   ByVal popup As Form, _
   ByVal location As Point _
) 
Visual Basic (Usage)Copy Code
Dim instance As PopupWindowHelper
Dim owner As Control
Dim popup As Form
Dim location As Point
 
instance.ShowPopup(owner, popup, location)
C# 
public void ShowPopup( 
   Control owner,
   Form popup,
   Point location
)

Parameters

owner
Main form which owns the popup
popup
Window to show as a popup
location
Location relative to the screen to show the popup at.

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

© 2002-2012 ComponentOne, a division of GrapeCity. All Rights Reserved.