c# - Transparent, Click-Through Forms except custom Title bar -


Text after "

I was picked up some code, click through a topmost applied, transparent and code-although the form:

With this code, all the forms are transparent and click OK (text, image, control button ...)

There is no current form border style (No limit, no title bar). Now I want to create a custom title bar, allow user move form to be on the screen, like other positions (like title bar).

The problems here, all the forms can not click on it (click-due code), how to make a click-off form, but leaving that custom title bar?

The custom title bar should be transparent as the other element. I do not want to keep the original title bar, it looks bad for my application.

Code> WS_EX_LAYERED style means that you have only < Create your own with the / strong> updatedreadwindows function. You can still get all the messages from your control, by providing that you have already painted it with UpdateLayeredWindow .

UpdateLayeredWindow a hdc: will handle only device reference , so if you want to draw a picture:

  Interrupt screen HDC = GETDESSI (Intapt. Zero); IntPtr bmpHdc = CreateCompatibleDC (screenHDC); IntPtr hBitmap; Bitmap BMP = .... // Load your bitmap, a PNG for transparency, an HBIMmap = BMP. GETHBETAP (Color. FARBB (0)); // Zero: Background is a transparent selection object (BMPHDC, HBIMAP); UpdateLayeredWindow (this.Handle, Screen HDC, ..., ..., bmpHdc, ..., ..., ..., ...);  

Take a look for more information


Comments