But if you wanted to do that 'Progress bar with XOR' look it's not exactly difficult to achieve in GDI+ despite the lack of XOR drawing:
Rectangle r = ClientRectangle; r.Width = (r.Width * (percent)) / 100; using (GraphicsPath gp = new GraphicsPath()) using (StringFormat sf = new StringFormat()) { sf.Alignment = StringAlignment.Center; sf.LineAlignment = StringAlignment.Center; gp.AddRectangle(r); gp.AddString(string.Format("{0}%", percent), Font.FontFamily, (int) Font.Style, Font.Size, ClientRectangle, sf); e.Graphics.SmoothingMode = SmoothingMode.AntiAlias; e.Graphics.FillPath(Brushes.Navy, gp); } Bear in mind that you really don't want to use XORing for this sort of thing anyway, because it's not going to work well with either font smoothing or cleartype. So drawing it properly is a better bet. The code above doesn't support ClearType of course - it always just uses plain antialiasing. If you wanted to you could do a version that worked with whatever font technology was in use on the machine in question by using a different technique: set the clip rectangle to the first section and draw it, and set it again to the second section, and draw it with reversed colours. Who needs XOR anyway? -- Ian Griffiths DevelopMentor ----- Original Message ----- From: "Bryan Batchelder" [EMAIL PROTECTED] I recall reading that GDI+ lacks XOR - and that was a majoring complaint... Just food for thought along with this suggestion. > -----Original Message----- > From: Robert Isaacs > > I don't think so. > > But writing a progress bar is one of the easiest controls you > can create. Write a small control with Minimum, Maximum, and > Value properties. Override the OnPaint method and use > drawRectangle to draw the progress bar (depending on how > fancy you want to make it look). Then drawString right over > the progress bar (you might want to look into XORing the > string on to reverse the color, not sure how to do this with > GDI+). > > -----Original Message----- > From: Jeff Roberts [mailto:[EMAIL PROTECTED]] > > Is there any way to have text in a ProgressBar. i.e. Have a > ProgressBar that also contains the text "Operation x% Complete" ? You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.