c# - How to make the background image transparent in windows mobile? -


I'm developing the smart device application in C #. I'm new to Windows Mobile I have added the background image for the form in my application using the following code. I want to make this image transparent so that other controls are displayed properly on my windows form.

  Protected Override Zero OnPaint (PaintEventArgs e) {base.OnPaint (e); Bitmap CreateCustomerImage = new bitmap (@ "/ storage card / background page"); E.Graphics.DrawImage (CreateCustomerImage, 0, 0); }  

The background image is the blue color when app controls, such as labels, text boxes & amp; Other controls displayed in white How to solve this problem? Can you provide me any code or link through which I can solve the above problem?

I can not do this if you want to make your control transparent or an image, but if you If you want to make it transparent, then how to create it.

You have to set a special pixel in the form of a transparent color in the form of Windows Mobile, it does not support "Basically", while creating an image properties that you use when portraying the image The examples below use pixels as "transparent colors" in the upper left corner.

  Private Readonly Image Etibetor; .ctor () {imgattr = new image property (); Color trns = new bitmap (image) .GetPixel (0, 0); Imagatator. Satkoloriki (Trenance, Trance); } Secure Override Zero OnPaint (PaintEventArgs E) {e.Graphics.DrawImage (Image, new rectangle (0, 0, width, height), 0, 0, image.Width, image.Height, GraphicsUnit.Pixel, imgattr); }  

Comments