Click here to Skip to main content
15,896,201 members
Articles / Programming Languages / Visual Basic

Replacing MainMenu Controls With VS2005 MenuStrip Controls

Rate me:
Please Sign up or sign in to vote.
0.00/5 (No votes)
27 Feb 2008CPOL1 min read 32.7K   385   15  
Code to do an automated replace of the MainMenu controls
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class frmMain
	Inherits System.Windows.Forms.Form

	'Form overrides dispose to clean up the component list.
	<System.Diagnostics.DebuggerNonUserCode()> _
	Protected Overrides Sub Dispose(ByVal disposing As Boolean)
		Try
			If disposing AndAlso components IsNot Nothing Then
				components.Dispose()
			End If
		Finally
			MyBase.Dispose(disposing)
		End Try
	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.
	<System.Diagnostics.DebuggerStepThrough()> _
	Private Sub InitializeComponent()
		Me.cmdReplace = New System.Windows.Forms.Button
		Me.txtFolder = New System.Windows.Forms.TextBox
		Me.Label1 = New System.Windows.Forms.Label
		Me.FolderBrowserDialog1 = New System.Windows.Forms.FolderBrowserDialog
		Me.txtStatus = New System.Windows.Forms.TextBox
		Me.Label2 = New System.Windows.Forms.Label
		Me.SuspendLayout()
		'
		'cmdReplace
		'
		Me.cmdReplace.Location = New System.Drawing.Point(388, 35)
		Me.cmdReplace.Name = "cmdReplace"
		Me.cmdReplace.Size = New System.Drawing.Size(107, 23)
		Me.cmdReplace.TabIndex = 0
		Me.cmdReplace.Text = "Replace Controls"
		Me.cmdReplace.UseVisualStyleBackColor = True
		'
		'txtFolder
		'
		Me.txtFolder.Location = New System.Drawing.Point(76, 37)
		Me.txtFolder.Name = "txtFolder"
		Me.txtFolder.Size = New System.Drawing.Size(292, 20)
		Me.txtFolder.TabIndex = 1
		'
		'Label1
		'
		Me.Label1.AutoSize = True
		Me.Label1.Location = New System.Drawing.Point(28, 40)
		Me.Label1.Name = "Label1"
		Me.Label1.Size = New System.Drawing.Size(42, 13)
		Me.Label1.TabIndex = 2
		Me.Label1.Text = "Folder :"
		'
		'txtStatus
		'
		Me.txtStatus.Enabled = False
		Me.txtStatus.Location = New System.Drawing.Point(31, 118)
		Me.txtStatus.Multiline = True
		Me.txtStatus.Name = "txtStatus"
		Me.txtStatus.Size = New System.Drawing.Size(464, 206)
		Me.txtStatus.TabIndex = 3
		'
		'Label2
		'
		Me.Label2.AutoSize = True
		Me.Label2.Location = New System.Drawing.Point(28, 102)
		Me.Label2.Name = "Label2"
		Me.Label2.Size = New System.Drawing.Size(43, 13)
		Me.Label2.TabIndex = 2
		Me.Label2.Text = "Status :"
		'
		'frmMain
		'
		Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
		Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
		Me.ClientSize = New System.Drawing.Size(524, 351)
		Me.Controls.Add(Me.txtStatus)
		Me.Controls.Add(Me.Label2)
		Me.Controls.Add(Me.Label1)
		Me.Controls.Add(Me.txtFolder)
		Me.Controls.Add(Me.cmdReplace)
		Me.Name = "frmMain"
		Me.Text = "Replace MainMenu with MenuStrip"
		Me.ResumeLayout(False)
		Me.PerformLayout()

	End Sub
	Friend WithEvents cmdReplace As System.Windows.Forms.Button
	Friend WithEvents txtFolder As System.Windows.Forms.TextBox
	Friend WithEvents Label1 As System.Windows.Forms.Label
	Friend WithEvents FolderBrowserDialog1 As System.Windows.Forms.FolderBrowserDialog
	Friend WithEvents txtStatus As System.Windows.Forms.TextBox
	Friend WithEvents Label2 As System.Windows.Forms.Label

End Class

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior) SDT
South Africa South Africa
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions