Hallo,
ich möchte das mein Label den text hat den man unter Einstellungen eingestellt hat, bloß es funktioniert nicht.
Code:
ich möchte das mein Label den text hat den man unter Einstellungen eingestellt hat, bloß es funktioniert nicht.
Code:
VB.NET-Quellcode
- Public Class M_Button_1
- Inherits Windows.Forms.Control
- Dim WithEvents Unten As New PictureBox
- Dim WithEvents Intext As New Label
- Public WithEvents Text2 As String
- Public Sub New()
- Me.Controls.Add(Intext)
- Intext.Text = Text2
- Intext.AutoSize = False
- Intext.TextAlign = ContentAlignment.MiddleCenter
- Intext.Dock = DockStyle.Fill
- Me.Size = New System.Drawing.Point(75, 35)
- Me.Controls.Add(Unten)
- Unten.BackColor = Color.DarkRed
- Unten.Dock = DockStyle.Bottom
- Unten.Size = New System.Drawing.Point(5, 4)
- Intext.Font = New System.Drawing.Font("Tahoma", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
- End Sub
- Private Sub M_Button_1_MouseLeave(sender As Object, e As EventArgs) Handles Me.MouseLeave
- Unten.BackColor = Color.Transparent
- Intext.ForeColor = Color.Gray
- End Sub
- Private Sub M_Button_1_MouseMove(sender As Object, e As MouseEventArgs) Handles Me.MouseMove
- Unten.BackColor = Color.DarkRed
- Intext.ForeColor = Color.Black
- End Sub
- Private Sub Unten_MouseLeave(sender As Object, e As EventArgs) Handles Unten.MouseLeave
- Unten.BackColor = Color.Transparent
- Intext.ForeColor = Color.Gray
- End Sub
- Private Sub Unten_MouseMove(sender As Object, e As MouseEventArgs) Handles Unten.MouseMove
- Unten.BackColor = Color.DarkRed
- Intext.ForeColor = Color.Black
- End Sub
- Private Sub Intext_MouseLeave(sender As Object, e As EventArgs) Handles Intext.MouseLeave
- Unten.BackColor = Color.Transparent
- Intext.ForeColor = Color.Gray
- End Sub
- Private Sub Intext_MouseMove(sender As Object, e As MouseEventArgs) Handles Intext.MouseMove
- Unten.BackColor = Color.DarkRed
- Intext.ForeColor = Color.Black
- End Sub
- End Class
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von „GirlOnFire“ ()