The document contains code for a form with a label. It defines click event handlers for different menu items that set the text alignment of the label to various positions (top left, top center, etc.) and set the text to "HERE". The code provides a way to dynamically position text in a label through menu selections.
The document contains code for a form with a label. It defines click event handlers for different menu items that set the text alignment of the label to various positions (top left, top center, etc.) and set the text to "HERE". The code provides a way to dynamically position text in a label through menu selections.
The document contains code for a form with a label. It defines click event handlers for different menu items that set the text alignment of the label to various positions (top left, top center, etc.) and set the text to "HERE". The code provides a way to dynamically position text in a label through menu selections.
Private Sub TopLeftToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles TopLeftToolStripMenuItem.Click Me.Label1.TextAlign = ContentAlignment.TopLeft Me.Label1.Text = "HERE" End Sub Private Sub TopMiddleToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TopMiddleToolStripMenuItem.Click Me.Label1.TextAlign = ContentAlignment.TopCenter Me.Label1.Text = "HERE" End Sub Private Sub TopRightToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TopRightToolStripMenuItem.Click Me.Label1.TextAlign = ContentAlignment.TopRight Me.Label1.Text = "HERE" End Sub Private Sub MiddleLeftToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MiddleLeftToolStripMenuItem.Click Me.Label1.TextAlign = ContentAlignment.MiddleLeft Me.Label1.Text = "HERE" End Sub Private Sub MiddleCenterToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MiddleCenterToolStripMenuItem.Click Me.Label1.TextAlign = ContentAlignment.MiddleCenter Me.Label1.Text = "HERE" End Sub Private Sub MiddleRightToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MiddleRightToolStripMenuItem.Click Me.Label1.TextAlign = ContentAlignment.MiddleRight Me.Label1.Text = "HERE" End Sub Private Sub BottemLeftToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BottemLeftToolStripMenuItem.Click Me.Label1.TextAlign = ContentAlignment.BottomLeft Me.Label1.Text = "HERE" End Sub Private Sub BottemCenterToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BottemCenterToolStripMenuItem.Click Me.Label1.TextAlign = ContentAlignment.BottomCenter Me.Label1.Text = "HERE" End Sub Private Sub BottomRightToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BottomRightToolStripMenuItem.Click Me.Label1.TextAlign = ContentAlignment.BottomRight Me.Label1.Text = "HERE" End Sub Private Sub ExitToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ExitToolStripMenuItem.Click