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

How Can i Change the default Title bar with my own Skin

Thread ID:





39265 Jan 3,2006 10:07 AM UTC Mar 28,2006 01:55 PM UTC WinForms 1
Tags: FAQ
Muhamma Abubakar
Asked On January 3, 2006 10:07 AM UTC

Hello ! i want to replace win form Title Bar with my own image . i hav succesfully applied Skin on my Forms with help of www.codeproject.com but unable to replace Title Bar any one can help thx in advance

Joy K George [Syncfusion]
Replied On March 28, 2006 01:55 PM UTC

Hi Muhamma, Please go through the below code snippet and let me know if you have any doubts. [System.Runtime.InteropServices.DllImport("user32.dll")] static extern IntPtr GetWindowDC(IntPtr hWnd); protected override void OnPaint(PaintEventArgs e) { base.OnPaint(e); IntPtr hDC = GetWindowDC(this.Handle); Graphics g = Graphics.FromHdc(hDC); Brush b = new System.Drawing.Drawing2D.LinearGradientBrush(new Rectangle(5, 5, this.Width, 30), Color.Red, Color.Green, 45); g.FillRectangle(b, new Rectangle(5, 5, this.Width, 30)); } Regards Joy


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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

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