本文整理匯總了VB.NET中System.Windows.Forms.ToolStrip類的典型用法代碼示例。如果您正苦於以下問題:VB.NET ToolStrip類的具體用法?VB.NET ToolStrip怎麽用?VB.NET ToolStrip使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了ToolStrip類的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的VB.NET代碼示例。
示例1: Form1
' 導入命名空間
Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.Data
Imports System.Drawing
Imports System.Text
Imports System.Windows.Forms
Public Class Form1
Inherits Form
Private toolStripContainer1 As ToolStripContainer
Private toolStrip1 As ToolStrip
Public Sub New()
InitializeComponent()
End Sub
<STAThread()> _
Shared Sub Main()
Application.EnableVisualStyles()
Application.Run(New Form1())
End Sub
Private Sub InitializeComponent()
toolStripContainer1 = New System.Windows.Forms.ToolStripContainer()
toolStrip1 = New System.Windows.Forms.ToolStrip()
' Add items to the ToolStrip.
toolStrip1.Items.Add("One")
toolStrip1.Items.Add("Two")
toolStrip1.Items.Add("Three")
' Add the ToolStrip to the top panel of the ToolStripContainer.
toolStripContainer1.TopToolStripPanel.Controls.Add(toolStrip1)
' Add the ToolStripContainer to the form.
Controls.Add(toolStripContainer1)
End Sub
End Class