none
Changing Form.Controlbox Color

    Question

  • Hi Guys,

    Can someone help me with this:

    1. I needed to change the color of the ControlBox of a Form. Is it possible?

    2. I also need to change the icon of the exit button. Is it possible?

    3. Is there a way I can change this using the designer?

    I'm using VS 2012

    Thanks in advance everyone.

    Tuesday, August 27, 2013 3:03 AM

Answers

  • Hi,

    To your first and third issue, unfortunately there is no workaround to change it using the Designer. I suggest you follow the suggestions of Aland Li in this thread.

    To your second issue, you might follow the code as below.

    If Me.MinimizeBox Then
                Dim img As Image = Image.FromFile(System.IO.Path.GetFullPath("..\..\1.jpg"))
                ControlPaint.DrawImageDisabled(e.Graphics, img, Me.Size.Width - img.Width, 0, Color.Empty)
    End If

    And here is an image of the result of the code.

    I created a simple sample, you might refer to this link to download it.

    Regards.


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Wednesday, August 28, 2013 7:33 AM