VB.Net/GUI/Toolstrip — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
|
(нет различий)
|
Версия 16:40, 26 мая 2010
Содержание
ToolStrip Container Demo
Imports System
Imports System.Data
Imports System.Windows.Forms
Imports System.Drawing
Imports System.Data.SqlClient
public class MainClass
Shared Sub Main()
Dim form1 As Form = New Form1
Application.Run(form1)
End Sub
End Class
<Global.Microsoft.VisualBasic.rupilerServices.DesignerGenerated()> _
Partial Public Class Form1
Inherits System.Windows.Forms.Form
"Form overrides dispose to clean up the component list.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
MyBase.Dispose(disposing)
End Sub
"Required by the Windows Form Designer
Private components As System.ruponentModel.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.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Me.ToolStripContainer1 = New System.Windows.Forms.ToolStripContainer
Me.ToolStrip4 = New System.Windows.Forms.ToolStrip
Me.ToolStripLabel4 = New System.Windows.Forms.ToolStripLabel
Me.ToolStrip3 = New System.Windows.Forms.ToolStrip
Me.ToolStripLabel3 = New System.Windows.Forms.ToolStripLabel
Me.ToolStrip1 = New System.Windows.Forms.ToolStrip
Me.ToolStripLabel1 = New System.Windows.Forms.ToolStripLabel
Me.ToolStrip2 = New System.Windows.Forms.ToolStrip
Me.ToolStripLabel2 = New System.Windows.Forms.ToolStripLabel
Me.ToolStrip5 = New System.Windows.Forms.ToolStrip
Me.ToolStripLabel5 = New System.Windows.Forms.ToolStripLabel
Me.PictureBox1 = New System.Windows.Forms.PictureBox
Me.ToolStripContainer1.BottomToolStripPanel.SuspendLayout()
Me.ToolStripContainer1.ContentPanel.SuspendLayout()
Me.ToolStripContainer1.RightToolStripPanel.SuspendLayout()
Me.ToolStripContainer1.TopToolStripPanel.SuspendLayout()
Me.ToolStripContainer1.SuspendLayout()
Me.ToolStrip4.SuspendLayout()
Me.ToolStrip3.SuspendLayout()
Me.ToolStrip1.SuspendLayout()
Me.ToolStrip2.SuspendLayout()
Me.ToolStrip5.SuspendLayout()
CType(Me.PictureBox1, System.ruponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
"
"ToolStripContainer1
"
"
"ToolStripContainer1.BottomToolStripPanel
"
Me.ToolStripContainer1.BottomToolStripPanel.Controls.Add(Me.ToolStrip5)
Me.ToolStripContainer1.BottomToolStripPanel.Controls.Add(Me.ToolStrip4)
"
"ToolStripContainer1.ContentPanel
"
Me.ToolStripContainer1.ContentPanel.Controls.Add(Me.PictureBox1)
Me.ToolStripContainer1.Dock = System.Windows.Forms.DockStyle.Fill
Me.ToolStripContainer1.Location = New System.Drawing.Point(0, 0)
Me.ToolStripContainer1.Name = "ToolStripContainer1"
"
"ToolStripContainer1.RightToolStripPanel
"
Me.ToolStripContainer1.RightToolStripPanel.Controls.Add(Me.ToolStrip3)
Me.ToolStripContainer1.Size = New System.Drawing.Size(292, 273)
Me.ToolStripContainer1.TabIndex = 0
Me.ToolStripContainer1.Text = "ToolStripContainer1"
"
"ToolStripContainer1.TopToolStripPanel
"
Me.ToolStripContainer1.TopToolStripPanel.Controls.Add(Me.ToolStrip1)
Me.ToolStripContainer1.TopToolStripPanel.Controls.Add(Me.ToolStrip2)
"
"ToolStrip4
"
Me.ToolStrip4.Dock = System.Windows.Forms.DockStyle.None
Me.ToolStrip4.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripLabel4})
Me.ToolStrip4.Location = New System.Drawing.Point(40, 0)
Me.ToolStrip4.Name = "ToolStrip4"
Me.ToolStrip4.Size = New System.Drawing.Size(78, 25)
Me.ToolStrip4.TabIndex = 2
Me.ToolStrip4.Text = "ToolStrip4"
"
"ToolStripLabel4
"
Me.ToolStripLabel4.Name = "ToolStripLabel4"
Me.ToolStripLabel4.Text = "ToolStrip4"
"
"ToolStrip3
"
Me.ToolStrip3.Dock = System.Windows.Forms.DockStyle.None
Me.ToolStrip3.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripLabel3})
Me.ToolStrip3.Location = New System.Drawing.Point(0, 25)
Me.ToolStrip3.Name = "ToolStrip3"
Me.ToolStrip3.Size = New System.Drawing.Size(25, 81)
Me.ToolStrip3.TabIndex = 3
Me.ToolStrip3.Text = "ToolStrip3"
Me.ToolStrip3.TextDirection = System.Windows.Forms.ToolStripTextDirection.Vertical90
"
"ToolStripLabel3
"
Me.ToolStripLabel3.AutoSize = False
Me.ToolStripLabel3.Name = "ToolStripLabel3"
Me.ToolStripLabel3.Size = New System.Drawing.Size(25, 69)
Me.ToolStripLabel3.Text = "ToolStrip3"
"
"ToolStrip1
"
Me.ToolStrip1.Dock = System.Windows.Forms.DockStyle.None
Me.ToolStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripLabel1})
Me.ToolStrip1.Location = New System.Drawing.Point(0, 0)
Me.ToolStrip1.Name = "ToolStrip1"
Me.ToolStrip1.Size = New System.Drawing.Size(109, 25)
Me.ToolStrip1.TabIndex = 0
Me.ToolStrip1.Text = "ToolStrip1"
"
"ToolStripLabel1
"
Me.ToolStripLabel1.Name = "ToolStripLabel1"
Me.ToolStripLabel1.Text = "ToolStrip1"
"
"ToolStrip2
"
Me.ToolStrip2.Dock = System.Windows.Forms.DockStyle.None
Me.ToolStrip2.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripLabel2})
Me.ToolStrip2.Location = New System.Drawing.Point(183, 0)
Me.ToolStrip2.Name = "ToolStrip2"
Me.ToolStrip2.Size = New System.Drawing.Size(78, 25)
Me.ToolStrip2.TabIndex = 1
Me.ToolStrip2.Text = "ToolStrip2"
"
"ToolStripLabel2
"
Me.ToolStripLabel2.Name = "ToolStripLabel2"
Me.ToolStripLabel2.Text = "ToolStrip2"
"
"ToolStrip5
"
Me.ToolStrip5.Dock = System.Windows.Forms.DockStyle.None
Me.ToolStrip5.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripLabel5})
Me.ToolStrip5.Location = New System.Drawing.Point(168, 0)
Me.ToolStrip5.Name = "ToolStrip5"
Me.ToolStrip5.Size = New System.Drawing.Size(78, 25)
Me.ToolStrip5.TabIndex = 3
Me.ToolStrip5.Text = "ToolStrip5"
"
"ToolStripLabel5
"
Me.ToolStripLabel5.Name = "ToolStripLabel5"
Me.ToolStripLabel5.Text = "ToolStrip5"
"
"PictureBox1
"
Me.PictureBox1.BackColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(224, Byte), Integer), CType(CType(192, Byte), Integer))
Me.PictureBox1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
Me.PictureBox1.Dock = System.Windows.Forms.DockStyle.Fill
Me.PictureBox1.Location = New System.Drawing.Point(0, 0)
Me.PictureBox1.Name = "PictureBox1"
Me.PictureBox1.Size = New System.Drawing.Size(267, 223)
Me.PictureBox1.TabIndex = 0
Me.PictureBox1.TabStop = False
"
"Form1
"
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(292, 273)
Me.Controls.Add(Me.ToolStripContainer1)
Me.Name = "Form1"
Me.Text = "UseToolStripContainer"
Me.ToolStripContainer1.BottomToolStripPanel.ResumeLayout(False)
Me.ToolStripContainer1.BottomToolStripPanel.PerformLayout()
Me.ToolStripContainer1.ContentPanel.ResumeLayout(False)
Me.ToolStripContainer1.RightToolStripPanel.ResumeLayout(False)
Me.ToolStripContainer1.RightToolStripPanel.PerformLayout()
Me.ToolStripContainer1.TopToolStripPanel.ResumeLayout(False)
Me.ToolStripContainer1.TopToolStripPanel.PerformLayout()
Me.ToolStripContainer1.ResumeLayout(False)
Me.ToolStripContainer1.PerformLayout()
Me.ToolStrip4.ResumeLayout(False)
Me.ToolStrip3.ResumeLayout(False)
Me.ToolStrip1.ResumeLayout(False)
Me.ToolStrip2.ResumeLayout(False)
Me.ToolStrip5.ResumeLayout(False)
CType(Me.PictureBox1, System.ruponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False)
End Sub
Friend WithEvents ToolStripContainer1 As System.Windows.Forms.ToolStripContainer
Friend WithEvents ToolStrip2 As System.Windows.Forms.ToolStrip
Friend WithEvents ToolStripLabel2 As System.Windows.Forms.ToolStripLabel
Friend WithEvents ToolStrip1 As System.Windows.Forms.ToolStrip
Friend WithEvents ToolStripLabel1 As System.Windows.Forms.ToolStripLabel
Friend WithEvents ToolStrip4 As System.Windows.Forms.ToolStrip
Friend WithEvents ToolStripLabel4 As System.Windows.Forms.ToolStripLabel
Friend WithEvents ToolStrip3 As System.Windows.Forms.ToolStrip
Friend WithEvents ToolStripLabel3 As System.Windows.Forms.ToolStripLabel
Friend WithEvents ToolStrip5 As System.Windows.Forms.ToolStrip
Friend WithEvents ToolStripLabel5 As System.Windows.Forms.ToolStripLabel
Friend WithEvents PictureBox1 As System.Windows.Forms.PictureBox
End Class
ToolStrip Container Demo 2
Imports System
Imports System.Data
Imports System.Windows.Forms
Imports System.Drawing
Imports System.Data.SqlClient
public class MainClass
Shared Sub Main()
Dim form1 As Form = New Form1
Application.Run(form1)
End Sub
End Class
Public Class Form1
Private Sub ToolStrip1_DockChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ToolStrip1.DockChanged
OrientToolStrip(ToolStrip1)
End Sub
Private Sub OrientToolStrip(ByVal tool_strip As ToolStrip)
If tool_strip.Parent Is Nothing Then Exit Sub
Dim new_orientation As ToolStripTextDirection = ToolStripTextDirection.Horizontal
Select Case tool_strip.Parent.Dock
Case DockStyle.Left
new_orientation = ToolStripTextDirection.Vertical270
Case DockStyle.Right
new_orientation = ToolStripTextDirection.Vertical90
End Select
For Each ctl As ToolStripItem In tool_strip.Items
ctl.TextDirection = new_orientation
Console.WriteLine(ctl.Name)
Next ctl
End Sub
Private Sub ToolStrip2_ParentChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ToolStrip2.ParentChanged
OrientToolStrip(ToolStrip2)
End Sub
End Class
<Global.Microsoft.VisualBasic.rupilerServices.DesignerGenerated()> _
Partial Public Class Form1
Inherits System.Windows.Forms.Form
"Form overrides dispose to clean up the component list.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
MyBase.Dispose(disposing)
End Sub
"Required by the Windows Form Designer
Private components As System.ruponentModel.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.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Me.ToolStripContainer1 = New System.Windows.Forms.ToolStripContainer
Me.ToolStrip4 = New System.Windows.Forms.ToolStrip
Me.ToolStripLabel4 = New System.Windows.Forms.ToolStripLabel
Me.ToolStrip5 = New System.Windows.Forms.ToolStrip
Me.ToolStripLabel5 = New System.Windows.Forms.ToolStripLabel
Me.PictureBox1 = New System.Windows.Forms.PictureBox
Me.ToolStrip3 = New System.Windows.Forms.ToolStrip
Me.ToolStripLabel3 = New System.Windows.Forms.ToolStripLabel
Me.ToolStrip1 = New System.Windows.Forms.ToolStrip
Me.ToolStripLabel1 = New System.Windows.Forms.ToolStripLabel
Me.ToolStrip2 = New System.Windows.Forms.ToolStrip
Me.ToolStripLabel2 = New System.Windows.Forms.ToolStripLabel
Me.ToolStripContainer1.BottomToolStripPanel.SuspendLayout()
Me.ToolStripContainer1.ContentPanel.SuspendLayout()
Me.ToolStripContainer1.RightToolStripPanel.SuspendLayout()
Me.ToolStripContainer1.TopToolStripPanel.SuspendLayout()
Me.ToolStripContainer1.SuspendLayout()
Me.ToolStrip4.SuspendLayout()
Me.ToolStrip5.SuspendLayout()
CType(Me.PictureBox1, System.ruponentModel.ISupportInitialize).BeginInit()
Me.ToolStrip3.SuspendLayout()
Me.ToolStrip1.SuspendLayout()
Me.ToolStrip2.SuspendLayout()
Me.SuspendLayout()
"
"ToolStripContainer1
"
"
"ToolStripContainer1.BottomToolStripPanel
"
Me.ToolStripContainer1.BottomToolStripPanel.Controls.Add(Me.ToolStrip4)
Me.ToolStripContainer1.BottomToolStripPanel.Controls.Add(Me.ToolStrip5)
"
"ToolStripContainer1.ContentPanel
"
Me.ToolStripContainer1.ContentPanel.Controls.Add(Me.PictureBox1)
Me.ToolStripContainer1.Dock = System.Windows.Forms.DockStyle.Fill
Me.ToolStripContainer1.Location = New System.Drawing.Point(0, 0)
Me.ToolStripContainer1.Name = "ToolStripContainer1"
"
"ToolStripContainer1.RightToolStripPanel
"
Me.ToolStripContainer1.RightToolStripPanel.Controls.Add(Me.ToolStrip3)
Me.ToolStripContainer1.Size = New System.Drawing.Size(292, 273)
Me.ToolStripContainer1.TabIndex = 1
Me.ToolStripContainer1.Text = "ToolStripContainer1"
"
"ToolStripContainer1.TopToolStripPanel
"
Me.ToolStripContainer1.TopToolStripPanel.Controls.Add(Me.ToolStrip1)
Me.ToolStripContainer1.TopToolStripPanel.Controls.Add(Me.ToolStrip2)
"
"ToolStrip4
"
Me.ToolStrip4.Dock = System.Windows.Forms.DockStyle.None
Me.ToolStrip4.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripLabel4})
Me.ToolStrip4.Location = New System.Drawing.Point(40, 0)
Me.ToolStrip4.Name = "ToolStrip4"
Me.ToolStrip4.Size = New System.Drawing.Size(109, 25)
Me.ToolStrip4.TabIndex = 2
Me.ToolStrip4.Text = "ToolStrip4"
"
"ToolStripLabel4
"
Me.ToolStripLabel4.Name = "ToolStripLabel4"
Me.ToolStripLabel4.Text = "ToolStrip4"
"
"ToolStrip5
"
Me.ToolStrip5.Dock = System.Windows.Forms.DockStyle.None
Me.ToolStrip5.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripLabel5})
Me.ToolStrip5.Location = New System.Drawing.Point(183, 0)
Me.ToolStrip5.Name = "ToolStrip5"
Me.ToolStrip5.Size = New System.Drawing.Size(109, 25)
Me.ToolStrip5.TabIndex = 3
Me.ToolStrip5.Text = "ToolStrip5"
"
"ToolStripLabel5
"
Me.ToolStripLabel5.Name = "ToolStripLabel5"
Me.ToolStripLabel5.Text = "ToolStrip5"
"
"PictureBox1
"
Me.PictureBox1.BackColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(224, Byte), Integer), CType(CType(192, Byte), Integer))
Me.PictureBox1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
Me.PictureBox1.Dock = System.Windows.Forms.DockStyle.Fill
Me.PictureBox1.Location = New System.Drawing.Point(0, 0)
Me.PictureBox1.Name = "PictureBox1"
Me.PictureBox1.Size = New System.Drawing.Size(267, 223)
Me.PictureBox1.TabIndex = 0
Me.PictureBox1.TabStop = False
"
"ToolStrip3
"
Me.ToolStrip3.Dock = System.Windows.Forms.DockStyle.None
Me.ToolStrip3.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripLabel3})
Me.ToolStrip3.Location = New System.Drawing.Point(0, 25)
Me.ToolStrip3.Name = "ToolStrip3"
Me.ToolStrip3.Size = New System.Drawing.Size(25, 81)
Me.ToolStrip3.TabIndex = 3
Me.ToolStrip3.Text = "ToolStrip3"
Me.ToolStrip3.TextDirection = System.Windows.Forms.ToolStripTextDirection.Vertical90
"
"ToolStripLabel3
"
Me.ToolStripLabel3.AutoSize = False
Me.ToolStripLabel3.Name = "ToolStripLabel3"
Me.ToolStripLabel3.Size = New System.Drawing.Size(25, 69)
Me.ToolStripLabel3.Text = "ToolStrip3"
"
"ToolStrip1
"
Me.ToolStrip1.Dock = System.Windows.Forms.DockStyle.None
Me.ToolStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripLabel1})
Me.ToolStrip1.Location = New System.Drawing.Point(0, 0)
Me.ToolStrip1.Name = "ToolStrip1"
Me.ToolStrip1.Size = New System.Drawing.Size(109, 25)
Me.ToolStrip1.TabIndex = 0
Me.ToolStrip1.Text = "ToolStrip1"
"
"ToolStripLabel1
"
Me.ToolStripLabel1.Name = "ToolStripLabel1"
Me.ToolStripLabel1.Text = "ToolStrip1"
"
"ToolStrip2
"
Me.ToolStrip2.Dock = System.Windows.Forms.DockStyle.None
Me.ToolStrip2.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripLabel2})
Me.ToolStrip2.Location = New System.Drawing.Point(109, 0)
Me.ToolStrip2.Name = "ToolStrip2"
Me.ToolStrip2.Size = New System.Drawing.Size(145, 25)
Me.ToolStrip2.TabIndex = 1
Me.ToolStrip2.Text = "ToolStrip2"
"
"ToolStripLabel2
"
Me.ToolStripLabel2.Name = "ToolStripLabel2"
Me.ToolStripLabel2.Text = "ToolStripLabel2"
"
"Form1
"
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(292, 273)
Me.Controls.Add(Me.ToolStripContainer1)
Me.Name = "Form1"
Me.Text = "UseToolStripContainer2"
Me.ToolStripContainer1.BottomToolStripPanel.ResumeLayout(False)
Me.ToolStripContainer1.BottomToolStripPanel.PerformLayout()
Me.ToolStripContainer1.ContentPanel.ResumeLayout(False)
Me.ToolStripContainer1.RightToolStripPanel.ResumeLayout(False)
Me.ToolStripContainer1.RightToolStripPanel.PerformLayout()
Me.ToolStripContainer1.TopToolStripPanel.ResumeLayout(False)
Me.ToolStripContainer1.TopToolStripPanel.PerformLayout()
Me.ToolStripContainer1.ResumeLayout(False)
Me.ToolStripContainer1.PerformLayout()
Me.ToolStrip4.ResumeLayout(False)
Me.ToolStrip5.ResumeLayout(False)
CType(Me.PictureBox1, System.ruponentModel.ISupportInitialize).EndInit()
Me.ToolStrip3.ResumeLayout(False)
Me.ToolStrip1.ResumeLayout(False)
Me.ToolStrip2.ResumeLayout(False)
Me.ResumeLayout(False)
End Sub
Friend WithEvents ToolStripContainer1 As System.Windows.Forms.ToolStripContainer
Friend WithEvents ToolStrip4 As System.Windows.Forms.ToolStrip
Friend WithEvents ToolStripLabel4 As System.Windows.Forms.ToolStripLabel
Friend WithEvents ToolStrip5 As System.Windows.Forms.ToolStrip
Friend WithEvents ToolStripLabel5 As System.Windows.Forms.ToolStripLabel
Friend WithEvents PictureBox1 As System.Windows.Forms.PictureBox
Friend WithEvents ToolStrip3 As System.Windows.Forms.ToolStrip
Friend WithEvents ToolStripLabel3 As System.Windows.Forms.ToolStripLabel
Friend WithEvents ToolStrip1 As System.Windows.Forms.ToolStrip
Friend WithEvents ToolStripLabel1 As System.Windows.Forms.ToolStripLabel
Friend WithEvents ToolStrip2 As System.Windows.Forms.ToolStrip
Friend WithEvents ToolStripLabel2 As System.Windows.Forms.ToolStripLabel
End Class
ToolStrip Control Demo 3
Imports System
Imports System.Data
Imports System.Collections
Imports System.Windows.Forms
Imports System.Drawing
Imports System.Data.SqlClient
public class MainClass
Shared Sub Main()
Dim form1 As Form = New Form1
Application.Run(form1)
End Sub
End Class
Public Class Form1
Private Sub radGood_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles radGood.CheckedChanged
slStatus.Image = New Bitmap("figure2.bmp")
End Sub
Private Sub radBad_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles radBad.CheckedChanged
slStatus.Image = New Bitmap("test.ico")
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
slTime.Text = Now.ToString("h:mm:ss tt")
End Sub
End Class
<Global.Microsoft.VisualBasic.rupilerServices.DesignerGenerated()> _
Partial Public Class Form1
Inherits System.Windows.Forms.Form
"Form overrides dispose to clean up the component list.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
MyBase.Dispose(disposing)
End Sub
"Required by the Windows Form Designer
Private components As System.ruponentModel.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.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Me.ruponents = New System.ruponentModel.Container
Me.TestStatusStripPanel1 = New System.Windows.Forms.ToolStripDropDownButton
Me.Option1ToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
Me.Option2ToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
Me.ProgStatusStripPanel = New System.Windows.Forms.ToolStripProgressBar
Me.radBad = New System.Windows.Forms.RadioButton
Me.radGood = New System.Windows.Forms.RadioButton
Me.Timer1 = New System.Windows.Forms.Timer(Me.ruponents)
Me.StatusStrip1 = New System.Windows.Forms.StatusStrip
Me.slTime = New System.Windows.Forms.ToolStripStatusLabel
Me.pbStatus = New System.Windows.Forms.ToolStripProgressBar
Me.slStatus = New System.Windows.Forms.ToolStripStatusLabel
Me.sbOptions = New System.Windows.Forms.ToolStripSplitButton
Me.BlueToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
Me.GreenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
Me.RedToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
Me.StatusStrip1.SuspendLayout()
Me.SuspendLayout()
"
"TestStatusStripPanel1
"
Me.TestStatusStripPanel1.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.Option1ToolStripMenuItem, Me.Option2ToolStripMenuItem})
Me.TestStatusStripPanel1.Name = "TestStatusStripPanel1"
Me.TestStatusStripPanel1.Size = New System.Drawing.Size(23, 23)
Me.TestStatusStripPanel1.Text = "Options"
"
"Option1ToolStripMenuItem
"
Me.Option1ToolStripMenuItem.Name = "Option1ToolStripMenuItem"
Me.Option1ToolStripMenuItem.Size = New System.Drawing.Size(139, 22)
Me.Option1ToolStripMenuItem.Text = "Option 1"
"
"Option2ToolStripMenuItem
"
Me.Option2ToolStripMenuItem.Name = "Option2ToolStripMenuItem"
Me.Option2ToolStripMenuItem.Size = New System.Drawing.Size(139, 22)
Me.Option2ToolStripMenuItem.Text = "Option 2"
"
"ProgStatusStripPanel
"
Me.ProgStatusStripPanel.AutoSize = False
Me.ProgStatusStripPanel.Name = "ProgStatusStripPanel"
Me.ProgStatusStripPanel.Size = New System.Drawing.Size(150, 20)
Me.ProgStatusStripPanel.Value = 70
"
"radBad
"
Me.radBad.AutoSize = True
Me.radBad.Location = New System.Drawing.Point(8, 28)
Me.radBad.Name = "radBad"
Me.radBad.Size = New System.Drawing.Size(44, 17)
Me.radBad.TabIndex = 8
Me.radBad.Text = "Bad"
"
"radGood
"
Me.radGood.AutoSize = True
Me.radGood.Location = New System.Drawing.Point(8, 4)
Me.radGood.Name = "radGood"
Me.radGood.Size = New System.Drawing.Size(51, 17)
Me.radGood.TabIndex = 7
Me.radGood.Text = "Good"
"
"Timer1
"
Me.Timer1.Enabled = True
Me.Timer1.Interval = 500
"
"StatusStrip1
"
Me.StatusStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.slStatus, Me.slTime, Me.sbOptions, Me.pbStatus})
Me.StatusStrip1.Location = New System.Drawing.Point(0, 65)
Me.StatusStrip1.Name = "StatusStrip1"
Me.StatusStrip1.Size = New System.Drawing.Size(405, 27)
Me.StatusStrip1.TabIndex = 9
Me.StatusStrip1.Text = "StatusStrip1"
"
"slTime
"
Me.slTime.Name = "slTime"
Me.slTime.Size = New System.Drawing.Size(82, 22)
Me.slTime.Text = "12:34:56 PM"
"
"pbStatus
"
Me.pbStatus.ForeColor = System.Drawing.SystemColors.ControlDarkDark
Me.pbStatus.Name = "pbStatus"
Me.pbStatus.Size = New System.Drawing.Size(100, 20)
Me.pbStatus.Value = 69
"
"slStatus
"
Me.slStatus.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
Me.slStatus.Image = New Bitmap("test.ico")
Me.slStatus.Name = "slStatus"
Me.slStatus.Size = New System.Drawing.Size(16, 22)
"
"sbOptions
"
Me.sbOptions.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text
Me.sbOptions.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.BlueToolStripMenuItem, Me.GreenToolStripMenuItem, Me.RedToolStripMenuItem})
Me.sbOptions.Image = New Bitmap("figure2.bmp")
Me.sbOptions.ImageTransparentColor = System.Drawing.Color.Magenta
Me.sbOptions.Name = "sbOptions"
Me.sbOptions.Size = New System.Drawing.Size(72, 20)
Me.sbOptions.Text = "Options"
"
"BlueToolStripMenuItem
"
Me.BlueToolStripMenuItem.Name = "BlueToolStripMenuItem"
Me.BlueToolStripMenuItem.Size = New System.Drawing.Size(125, 22)
Me.BlueToolStripMenuItem.Text = "Blue"
"
"GreenToolStripMenuItem
"
Me.GreenToolStripMenuItem.Name = "GreenToolStripMenuItem"
Me.GreenToolStripMenuItem.Size = New System.Drawing.Size(125, 22)
Me.GreenToolStripMenuItem.Text = "Green"
"
"RedToolStripMenuItem
"
Me.RedToolStripMenuItem.Name = "RedToolStripMenuItem"
Me.RedToolStripMenuItem.Size = New System.Drawing.Size(125, 22)
Me.RedToolStripMenuItem.Text = "Red"
"
"Form1
"
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(405, 92)
Me.Controls.Add(Me.StatusStrip1)
Me.Controls.Add(Me.radBad)
Me.Controls.Add(Me.radGood)
Me.Name = "Form1"
Me.Text = "UseStatusStrip"
Me.StatusStrip1.ResumeLayout(False)
Me.StatusStrip1.PerformLayout()
Me.ResumeLayout(False)
Me.PerformLayout()
End Sub
Friend WithEvents TestStatusStripPanel1 As System.Windows.Forms.ToolStripDropDownButton
Friend WithEvents Option1ToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents Option2ToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents ProgStatusStripPanel As System.Windows.Forms.ToolStripProgressBar
Friend WithEvents radBad As System.Windows.Forms.RadioButton
Friend WithEvents radGood As System.Windows.Forms.RadioButton
Friend WithEvents Timer1 As System.Windows.Forms.Timer
Friend WithEvents StatusStrip1 As System.Windows.Forms.StatusStrip
Friend WithEvents slStatus As System.Windows.Forms.ToolStripStatusLabel
Friend WithEvents slTime As System.Windows.Forms.ToolStripStatusLabel
Friend WithEvents sbOptions As System.Windows.Forms.ToolStripSplitButton
Friend WithEvents BlueToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents GreenToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents RedToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents pbStatus As System.Windows.Forms.ToolStripProgressBar
End Class
Tool strip controls
Imports System
Imports System.Data
Imports System.Windows.Forms
Imports System.Drawing
Imports System.Data.SqlClient
public class MainClass
Shared Sub Main()
Dim form1 As Form = New Form1
Application.Run(form1)
End Sub
End Class
<Global.Microsoft.VisualBasic.rupilerServices.DesignerGenerated()> _
Partial Public Class Form1
Inherits System.Windows.Forms.Form
"Form overrides dispose to clean up the component list.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
MyBase.Dispose(disposing)
End Sub
"Required by the Windows Form Designer
Private components As System.ruponentModel.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.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Me.ToolStrip1 = New System.Windows.Forms.ToolStrip
Me.ToolStripButton1 = New System.Windows.Forms.ToolStripButton
Me.ToolStripLabel1 = New System.Windows.Forms.ToolStripLabel
Me.ToolStripSplitButton1 = New System.Windows.Forms.ToolStripSplitButton
Me.ToolStripDropDownButton1 = New System.Windows.Forms.ToolStripDropDownButton
Me.ToolStripSeparator1 = New System.Windows.Forms.ToolStripSeparator
Me.ToolStripComboBox1 = New System.Windows.Forms.ToolStripComboBox
Me.ToolStripTextBox1 = New System.Windows.Forms.ToolStripTextBox
Me.ToolStripProgressBar1 = New System.Windows.Forms.ToolStripProgressBar
Me.ToolStrip1.SuspendLayout()
Me.SuspendLayout()
"
"ToolStrip1
"
Me.ToolStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripButton1, Me.ToolStripLabel1, Me.ToolStripSplitButton1, Me.ToolStripDropDownButton1, Me.ToolStripSeparator1, Me.ToolStripComboBox1, Me.ToolStripTextBox1, Me.ToolStripProgressBar1})
Me.ToolStrip1.Location = New System.Drawing.Point(0, 0)
Me.ToolStrip1.Name = "ToolStrip1"
Me.ToolStrip1.Size = New System.Drawing.Size(647, 25)
Me.ToolStrip1.TabIndex = 0
Me.ToolStrip1.Text = "ToolStrip1"
"
"ToolStripButton1
"
Me.ToolStripButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
Me.ToolStripButton1.Image = New Bitmap("figure2.bmp")
Me.ToolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta
Me.ToolStripButton1.Name = "ToolStripButton1"
Me.ToolStripButton1.Text = "ToolStripButton1"
"
"ToolStripLabel1
"
Me.ToolStripLabel1.Name = "ToolStripLabel1"
Me.ToolStripLabel1.Text = "ToolStripLabel1"
"
"ToolStripSplitButton1
"
Me.ToolStripSplitButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
Me.ToolStripSplitButton1.Image = New Bitmap("figure2.bmp")
Me.ToolStripSplitButton1.ImageTransparentColor = System.Drawing.Color.Magenta
Me.ToolStripSplitButton1.Name = "ToolStripSplitButton1"
Me.ToolStripSplitButton1.Text = "ToolStripSplitButton1"
"
"ToolStripDropDownButton1
"
Me.ToolStripDropDownButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
Me.ToolStripDropDownButton1.Image = New Bitmap("figure2.bmp")
Me.ToolStripDropDownButton1.ImageTransparentColor = System.Drawing.Color.Magenta
Me.ToolStripDropDownButton1.Name = "ToolStripDropDownButton1"
Me.ToolStripDropDownButton1.Text = "ToolStripDropDownButton1"
"
"ToolStripSeparator1
"
Me.ToolStripSeparator1.Name = "ToolStripSeparator1"
"
"ToolStripComboBox1
"
Me.ToolStripComboBox1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.ImageAndText
Me.ToolStripComboBox1.Name = "ToolStripComboBox1"
Me.ToolStripComboBox1.Size = New System.Drawing.Size(121, 25)
Me.ToolStripComboBox1.Text = "ToolStripComboBox1"
"
"ToolStripTextBox1
"
Me.ToolStripTextBox1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.ImageAndText
Me.ToolStripTextBox1.Name = "ToolStripTextBox1"
Me.ToolStripTextBox1.Size = New System.Drawing.Size(100, 25)
Me.ToolStripTextBox1.Text = "ToolStripTextBox1"
"
"ToolStripProgressBar1
"
Me.ToolStripProgressBar1.BackColor = System.Drawing.Color.Black
Me.ToolStripProgressBar1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.ImageAndText
Me.ToolStripProgressBar1.Name = "ToolStripProgressBar1"
Me.ToolStripProgressBar1.Size = New System.Drawing.Size(100, 22)
Me.ToolStripProgressBar1.Text = "ToolStripProgressBar1"
Me.ToolStripProgressBar1.Value = 66
"
"Form1
"
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(647, 125)
Me.Controls.Add(Me.ToolStrip1)
Me.Name = "Form1"
Me.Text = "UseToolstrip"
Me.ToolStrip1.ResumeLayout(False)
Me.ToolStrip1.PerformLayout()
Me.ResumeLayout(False)
Me.PerformLayout()
End Sub
Friend WithEvents ToolStrip1 As System.Windows.Forms.ToolStrip
Friend WithEvents ToolStripButton1 As System.Windows.Forms.ToolStripButton
Friend WithEvents ToolStripLabel1 As System.Windows.Forms.ToolStripLabel
Friend WithEvents ToolStripSplitButton1 As System.Windows.Forms.ToolStripSplitButton
Friend WithEvents ToolStripDropDownButton1 As System.Windows.Forms.ToolStripDropDownButton
Friend WithEvents ToolStripSeparator1 As System.Windows.Forms.ToolStripSeparator
Friend WithEvents ToolStripComboBox1 As System.Windows.Forms.ToolStripComboBox
Friend WithEvents ToolStripTextBox1 As System.Windows.Forms.ToolStripTextBox
Friend WithEvents ToolStripProgressBar1 As System.Windows.Forms.ToolStripProgressBar
End Class