请教:tabcontrol加载窗体后原窗体内的控件鼠标操作
本帖最后由 core130 于 2011-05-17 22:28:40 编辑 将窗体加载到tabcontrol后,窗体上的textbox等控件的text文本内容 无法使用鼠标右键,或者拖动选择,不加载到tabcontrol就不会有这个问题,请教各位高手,是哪里还需要设置
Public Class Form1
Private Sub TextToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextToolStripMenuItem.Click
Dim mytab As New TabPage()
mytab.Text = TextToolStripMenuItem.Text
TabControl1.TabPages.Add(mytab)
Me.TabControl1.SelectedTab = mytab
Dim form As New Form2
form.TopLevel = False
mytab.Controls.Add(form)
form.Show()
form.Dock = DockStyle.Fill
End Sub
Private Sub Text1ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Text1ToolStripMenuItem.Click
Form2.Show()
End Sub
End Class