GrapeCity SPREAD for Windows Forms 11.0J
ShowPopup メソッド


ポップアップを所有するメインフォーム
ポップアップとして表示するウィンドウ
ポップアップを表示する位置の画面に対する相対位置。
指定したフォームをポップアップウィンドウとして表示し、オーナーのタイトルバーをアクティブな状態に維持します。さらに、ユーザーがポップアップウィンドウの外側をクリックした場合にポップアップをキャンセルする準備をします。

このメッセージを使用するための標準的なコードは次のとおりです。

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

System.Windows.Forms.Form.Load イベントではなくポップアップフォームのコンストラクターにできるかぎり多くの初期化コードを指定します。そうした方が外観が向上します。

構文
'Declaration
 
Public Sub ShowPopup( _
   ByVal owner As Control, _
   ByVal popup As Form, _
   ByVal location As Point _
) 
'使用法
 
Dim instance As PopupWindowHelper
Dim owner As Control
Dim popup As Form
Dim location As Point
 
instance.ShowPopup(owner, popup, location)
public void ShowPopup( 
   Control owner,
   Form popup,
   Point location
)

パラメータ

owner
ポップアップを所有するメインフォーム
popup
ポップアップとして表示するウィンドウ
location
ポップアップを表示する位置の画面に対する相対位置。
参照

PopupWindowHelper クラス
PopupWindowHelper メンバ

 

 


© 2004-2018, GrapeCity Inc. All rights reserved.