Here is the VB.NET generated code from the form hosting the usercontrol with
a NET tabcontrol that includes a masked edit COM control:
Public Class Form1
Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents UserControl11 As TabTest.UserControl1
<System.Diagnostics.De{*filter*}StepThrough()> Private Sub InitializeComponent()
Me.UserControl11 = New TabTest.UserControl1()
Me.SuspendLayout()
'UserControl11
'
Me.UserControl11.Location = New System.Drawing.Point(8, 8)
Me.UserControl11.Name = "UserControl11"
Me.UserControl11.Size = New System.Drawing.Size(552, 488)
Me.UserControl11.TabIndex = 0
'
'Form1
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(768, 597)
Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.UserControl11})
Me.Name = "Form1"
Me.Text = "Form1"
Me.ResumeLayout(False)
End Sub
#End Region
End Class
Here is the code from the VB.NET generated code in the usercontrol hosting
the masked edit COM control:
Public Class UserControl1
Inherits System.Windows.Forms.UserControl
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
'UserControl1 overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents TabPage1 As System.Windows.Forms.TabPage
Friend WithEvents TabPage2 As System.Windows.Forms.TabPage
Friend WithEvents TabPage3 As System.Windows.Forms.TabPage
Friend WithEvents TabPage4 As System.Windows.Forms.TabPage
Friend WithEvents TabControl1 As System.Windows.Forms.TabControl
Friend WithEvents AxMaskEdBox1 As AxMSMask.AxMaskEdBox
Friend WithEvents AxMaskEdBox3 As AxMSMask.AxMaskEdBox
Friend WithEvents AxMaskEdBox4 As AxMSMask.AxMaskEdBox
Friend WithEvents AxMaskEdBox5 As AxMSMask.AxMaskEdBox
<System.Diagnostics.De{*filter*}StepThrough()> Private Sub InitializeComponent()
Dim resources As System.Resources.ResourceManager = New
System.Resources.ResourceManager(GetType(UserControl1))
Me.TabPage1 = New System.Windows.Forms.TabPage()
Me.AxMaskEdBox5 = New AxMSMask.AxMaskEdBox()
Me.TabPage2 = New System.Windows.Forms.TabPage()
Me.AxMaskEdBox4 = New AxMSMask.AxMaskEdBox()
Me.TabPage3 = New System.Windows.Forms.TabPage()
Me.AxMaskEdBox3 = New AxMSMask.AxMaskEdBox()
Me.TabPage4 = New System.Windows.Forms.TabPage()
Me.AxMaskEdBox1 = New AxMSMask.AxMaskEdBox()
Me.TabControl1 = New System.Windows.Forms.TabControl()
Me.TabPage1.SuspendLayout()
CType(Me.AxMaskEdBox5, System.ComponentModel.ISupportInitialize).BeginInit()
Me.TabPage2.SuspendLayout()
CType(Me.AxMaskEdBox4, System.ComponentModel.ISupportInitialize).BeginInit()
Me.TabPage3.SuspendLayout()
CType(Me.AxMaskEdBox3, System.ComponentModel.ISupportInitialize).BeginInit()
Me.TabPage4.SuspendLayout()
CType(Me.AxMaskEdBox1, System.ComponentModel.ISupportInitialize).BeginInit()
Me.TabControl1.SuspendLayout()
Me.SuspendLayout()
'
'TabPage1
'
Me.TabPage1.Controls.AddRange(New System.Windows.Forms.Control()
{Me.AxMaskEdBox5})
Me.TabPage1.Location = New System.Drawing.Point(4, 22)
Me.TabPage1.Name = "TabPage1"
Me.TabPage1.Size = New System.Drawing.Size(520, 430)
Me.TabPage1.TabIndex = 0
Me.TabPage1.Text = "TabPage1"
'
'AxMaskEdBox5
'
Me.AxMaskEdBox5.ContainingControl = Me
Me.AxMaskEdBox5.Location = New System.Drawing.Point(208, 168)
Me.AxMaskEdBox5.Name = "AxMaskEdBox5"
Me.AxMaskEdBox5.OcxState =
CType(resources.GetObject("AxMaskEdBox5.OcxState"),
System.Windows.Forms.AxHost.State)
Me.AxMaskEdBox5.TabIndex = 0
'
'TabPage2
'
Me.TabPage2.Controls.AddRange(New System.Windows.Forms.Control()
{Me.AxMaskEdBox4})
Me.TabPage2.Location = New System.Drawing.Point(4, 22)
Me.TabPage2.Name = "TabPage2"
Me.TabPage2.Size = New System.Drawing.Size(520, 430)
Me.TabPage2.TabIndex = 1
Me.TabPage2.Text = "TabPage2"
'
'AxMaskEdBox4
'
Me.AxMaskEdBox4.ContainingControl = Me
Me.AxMaskEdBox4.Location = New System.Drawing.Point(224, 184)
Me.AxMaskEdBox4.Name = "AxMaskEdBox4"
Me.AxMaskEdBox4.OcxState =
CType(resources.GetObject("AxMaskEdBox4.OcxState"),
System.Windows.Forms.AxHost.State)
Me.AxMaskEdBox4.TabIndex = 1
'
'TabPage3
'
Me.TabPage3.Controls.AddRange(New System.Windows.Forms.Control()
{Me.AxMaskEdBox3})
Me.TabPage3.Location = New System.Drawing.Point(4, 22)
Me.TabPage3.Name = "TabPage3"
Me.TabPage3.Size = New System.Drawing.Size(520, 430)
Me.TabPage3.TabIndex = 2
Me.TabPage3.Text = "TabPage3"
'
'AxMaskEdBox3
'
Me.AxMaskEdBox3.ContainingControl = Me
Me.AxMaskEdBox3.Location = New System.Drawing.Point(208, 168)
Me.AxMaskEdBox3.Name = "AxMaskEdBox3"
Me.AxMaskEdBox3.OcxState =
CType(resources.GetObject("AxMaskEdBox3.OcxState"),
System.Windows.Forms.AxHost.State)
Me.AxMaskEdBox3.TabIndex = 0
'
'TabPage4
'
Me.TabPage4.Controls.AddRange(New System.Windows.Forms.Control()
{Me.AxMaskEdBox1})
Me.TabPage4.Location = New System.Drawing.Point(4, 22)
Me.TabPage4.Name = "TabPage4"
Me.TabPage4.Size = New System.Drawing.Size(520, 430)
Me.TabPage4.TabIndex = 3
Me.TabPage4.Text = "TabPage4"
'
'AxMaskEdBox1
'
Me.AxMaskEdBox1.ContainingControl = Me
Me.AxMaskEdBox1.Location = New System.Drawing.Point(256, 192)
Me.AxMaskEdBox1.Name = "AxMaskEdBox1"
Me.AxMaskEdBox1.OcxState =
CType(resources.GetObject("AxMaskEdBox1.OcxState"),
System.Windows.Forms.AxHost.State)
Me.AxMaskEdBox1.TabIndex = 0
'
'TabControl1
'
Me.TabControl1.Controls.AddRange(New System.Windows.Forms.Control()
{Me.TabPage1, Me.TabPage2, Me.TabPage3, Me.TabPage4})
Me.TabControl1.ItemSize = New System.Drawing.Size(62, 18)
Me.TabControl1.Location = New System.Drawing.Point(8, 16)
Me.TabControl1.Name = "TabControl1"
Me.TabControl1.SelectedIndex = 0
Me.TabControl1.Size = New System.Drawing.Size(528, 456)
Me.TabControl1.TabIndex = 0
'
'UserControl1
'
Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.TabControl1})
Me.Name = "UserControl1"
Me.Size = New System.Drawing.Size(552, 488)
Me.TabPage1.ResumeLayout(False)
CType(Me.AxMaskEdBox5, System.ComponentModel.ISupportInitialize).EndInit()
Me.TabPage2.ResumeLayout(False)
CType(Me.AxMaskEdBox4, System.ComponentModel.ISupportInitialize).EndInit()
Me.TabPage3.ResumeLayout(False)
CType(Me.AxMaskEdBox3, System.ComponentModel.ISupportInitialize).EndInit()
Me.TabPage4.ResumeLayout(False)
CType(Me.AxMaskEdBox1, System.ComponentModel.ISupportInitialize).EndInit()
Me.TabControl1.ResumeLayout(False)
Me.ResumeLayout(False)
End Sub
#End Region
End Class
Quote:
> Expand the text in the generated region of your form and send that this
way.
> I think we'll be able to help you from that.
> Thanks!
> Amanda and Chris
> VB .NET Team
> --
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> > This newsgroup rejects messages with inline pictures and any attachments
> > otherwise I would post the complete project folder. I sent the project
as
> > an attachment to you by regular email, and you wrote back that I should
> post
> > it in the newsgroup, which is impossible.
> > Ken Klausner
> > > Hey Ken --
> > > We tried to repro this but didn't get the same behavior. If you could
> > > attach a form that demonstrates the problem and include the version of
> the
> > > ActiveX control we'll try to help you out.
> > > Thanks,
> > > Amanda, Steve, and Todd
> > > VB .NET
> > > --
> > > This posting is provided "AS IS" with no warranties, and confers no
> > rights.
> > > > Working on a Windows Component in VB.NET, I have VB 6 masked edit
> boxes
> > > (COM
> > > > or active X control) on all three tab pages of a tab control.
Running
> a
> > > > test Windows Form project with my component, the masked edit boxes
> > appear
> > > on
> > > > the first tab page but not on the second and third tab pages. I've
> > tried
> > > > bringing the masked edits to the front, and cutting and pasting
> outside
> > > the
> > > > groupboxes, but the only thing that works is pasting on the first
tab
> > page
> > > > or on the UserControl itself.
> > > > Again, the masked edit control always appears on the first tab page,
> and
> > > > just in case, yes, the masked edits are
> > > > enabled and visible. All properties are the same for the masked
edits
> > on
> > > > all three tab
...
read more »