How to change the background Color label full length when mouse hover in C #

I can not select the shortcut back. Main color. Hovering the entire length, only you can select the word length

enter image description here

I would like to get background output similar to username as full width

private void label5_MouseHover(object sender, EventArgs e) {
    this.LblChange.BackgroundImage = null;
    this.LblChange.BackgroundImage = global::Flex.Properties.Resources.Mail1;
    this.LblChange.BackColor = Color.Blue;
    this.LblChange.BackgroundImageLayout = ImageLayout.Stretch;
    !
}
+4
source share
2 answers

select the label, then go to autoload and set it to false ... then increase the length of the label as much as you want ... then apply your code above ... it will work. All the best ...

+2
source

you need to change color label5:

private void label5_MouseHover(object sender, EventArgs e)
{ ...
  label5.BackColor = Color.Blue;
  ...
}

or you need to define a LblChangemouseover event:

private void LblChange_MouseHover(object sender, EventArgs e)
{
           ....
                this.LblChange.BackColor = Color.Blue;
           ...
}
0
source

All Articles