home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 October / CMCD1004.ISO / Software / Shareware / Programare / netxp / netxp.exe / Samples / VB / Bars / MdiChild.vb < prev    next >
Encoding:
Text File  |  2004-04-09  |  2.1 KB  |  66 lines

  1. Imports System
  2. Imports System.Drawing
  3. Imports System.Collections
  4. Imports System.ComponentModel
  5. Imports System.Windows.Forms
  6. Imports NETXP.Controls.Bars
  7.  
  8. Namespace Bars
  9.     Public Class MdiChild
  10.         Inherits System.Windows.Forms.Form
  11.         Private WithEvents button1 As System.Windows.Forms.Button
  12.  
  13.         Private manager As NETXP.Controls.Bars.CommandBarManager
  14.  
  15.         Public Sub New()
  16.             '
  17.             ' Required for Windows Form Designer support
  18.             '
  19.             InitializeComponent()
  20.  
  21.             '
  22.             ' TODO: Add any constructor code after InitializeComponent call
  23.             '
  24.         End Sub
  25.  
  26.         Public Sub SetManager(ByVal manager As NETXP.Controls.Bars.CommandBarManager)
  27.             Me.manager = manager
  28.         End Sub
  29.  
  30.         Protected Overrides Sub Dispose(ByVal disposing As Boolean)
  31.             MyBase.Dispose(disposing)
  32.         End Sub
  33.  
  34. #Region "Windows Form Designer generated code"
  35.         Private Sub InitializeComponent()
  36.             Me.button1 = New System.Windows.Forms.Button
  37.             Me.SuspendLayout()
  38.             ' 
  39.             ' button1
  40.             ' 
  41.             Me.button1.Location = New System.Drawing.Point(24, 16)
  42.             Me.button1.Name = "button1"
  43.             Me.button1.Size = New System.Drawing.Size(176, 48)
  44.             Me.button1.TabIndex = 1
  45.             Me.button1.Text = "Test Popup Window"
  46.             ' 
  47.             ' MdiChild
  48.             ' 
  49.             Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
  50.             Me.ClientSize = New System.Drawing.Size(344, 230)
  51.             Me.Controls.Add(Me.button1)
  52.             Me.Name = "MdiChild"
  53.             Me.Text = "MdiChild"
  54.             Me.ResumeLayout(False)
  55.  
  56.         End Sub
  57. #End Region
  58.  
  59.         Private Sub button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button1.Click
  60.             Dim frm As TestPopup
  61.             frm = New TestPopup
  62.             frm.SetManager(Me.manager)
  63.             frm.ShowPopup(Me.MdiParent, button1.PointToScreen(New Point(0, button1.Height)), False)
  64.         End Sub
  65.     End Class
  66. End Namespace