本文整理汇总了VB.NET中System.Windows.Forms.TabPage.TabPage构造函数的典型用法代码示例。如果您正苦于以下问题:VB.NET TabPage构造函数的具体用法?VB.NET TabPage怎么用?VB.NET TabPage使用的例子?那么, 这里精选的构造函数代码示例或许可以为您提供帮助。您也可以进一步了解该构造函数所在类System.Windows.Forms.TabPage
的用法示例。
在下文中一共展示了TabPage构造函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的VB.NET代码示例。
示例1: Form1
' 导入命名空间
Imports System.Windows.Forms
Public Class Form1
Inherits Form
Private tabControl1 As TabControl
Private tabPage1 As TabPage
Public Sub MyTabs()
Me.tabControl1 = New TabControl()
' Invokes the TabPage() constructor to create the tabPage1.
Me.tabPage1 = New System.Windows.Forms.TabPage()
Me.tabControl1.Controls.Add(tabPage1)
Me.Controls.Add(tabControl1)
End Sub
Public Sub New()
MyTabs()
End Sub
Shared Sub Main()
Application.Run(New Form1())
End Sub
End Class
示例2: Form1
' 导入命名空间
Imports System.Drawing
Imports System.Windows.Forms
Public Class Form1
Inherits Form
Private tabControl1 As TabControl
Private tabPage1 As TabPage
Private Sub MyTabs()
Me.tabControl1 = New TabControl()
Dim tabPageName As String = "myTabPage"
' Constructs a TabPage with a TabPage.Text value.
Me.tabPage1 = New TabPage(tabPageName)
Me.tabControl1.Controls.Add(tabPage1)
Me.tabControl1.Location = New Point(25, 25)
Me.tabControl1.Size = New Size(250, 250)
Me.ClientSize = New Size(300, 300)
Me.Controls.Add(tabControl1)
End Sub
Public Sub New()
MyTabs()
End Sub
Shared Sub Main()
Application.Run(New Form1())
End Sub
End Class