We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Customizing MetroForm Buttons (Minimize, Maximize, Close)

Thread ID:

Created:

Updated:

Platform:

Replies:

123882 Apr 28,2016 08:57 PM UTC May 5,2016 06:22 AM UTC WinForms 3
loading
Tags: MetroForm
Mark Eborn
Asked On April 28, 2016 08:57 PM UTC

Hello,

Is there a way to customize (in my case, make larger) the default buttons on the MetroForm (minimize, maximize, and close)?  

By default, they look quite small and awkward, especially on Windows 10.  I'd like to customize them a bit if possible...

Thanks in advance for any help you can provide.

Regards,
Mark

Keerthana Jegannathan [Syncfusion]
Replied On April 29, 2016 10:05 AM UTC

Hi Mark,   
   
Thank you for contacting Syncfusion Support.   
   
At present, MetroForm doesn’t have support to customize the ControlBox button bounds and appearance. However, it is possible to achieve the required appearance by using Caption Images support and handling the below events.    
   
ImageMouseMove   
   
This event is raised when the mouse pointer moves within the caption image and displays the ToolTip.   
  
 ImageMouseUp   
   
This event is raised when the mouse pointer is over the caption image and a mouse button is released and performs the required action.  
   
ImageMouseEnter   
   
This event is raised when the mouse pointer enters the caption image and highlights the color of the CaptionImage.  
   
ImageMouseLeave   
   
This event is raised when the mouse pointer leaves the caption image and shows the default color of the CaptionImage.  
   
 
Please refer to the below code snippet.   
 
 
//To Set Properties for the CaptionImages 
captionImage1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); 
captionImage1.Image = global::Metroform.Properties.Resources.Close; 
captionImage1.Location = new System.Drawing.Point(760, 4); 
captionImage1.Name = "CaptionImage1"; 
captionImage2.BackColor = System.Drawing.Color.Transparent; 
captionImage2.Image = global::Metroform.Properties.Resources.max; 
captionImage2.Location = new System.Drawing.Point(730, 4); 
captionImage2.Name = "CaptionImage2"; 
captionImage3.BackColor = System.Drawing.Color.Transparent; 
captionImage3.Image = global::Metroform.Properties.Resources.Minus; 
captionImage3.Location = new System.Drawing.Point(703, 4); 
captionImage3.Name = "CaptionImage3"; 
 
//To add Caption Images into the MetroForm 
this.CaptionImages.Add(captionImage1); 
this.CaptionImages.Add(captionImage2); 
this.CaptionImages.Add(captionImage3); 
 
We have prepared a sample for your reference, which can be downloaded from below location 
 
 
Screenshot: 
 
 
 
 
Regards, 
 
Keerthana 
 


Mark Eborn
Replied On May 4, 2016 03:52 PM UTC

This is great! Thank you for your help.

Regards,
Mark

Keerthana Jegannathan [Syncfusion]
Replied On May 5, 2016 06:22 AM UTC

Hi Mark, 
Thank you for your update. 

 

We are glad that we helped in achieving your requirement. Please let us know if you need further assistance. 

 

Regards, 

Keerthana 

  


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;