简体   繁体   中英

How to change opacity of Form window without changing opacity of text

I'm trying to recreate a Kali-Linux DOS window, just for fun and have my own custom commands in it.

I'm making a form which is a 70% visible form. Problem is, I tried putting the opacity of form to 70% but it made it ALL 70% visible instead. Putting in a picturebox and changing opacity of it didn't help either since it only shows the application instead of the background of my computer.

I know I could have done console application for this, but there is no appearance customization.

It's simply not possible in WinForms. A partially transparent form cannot have opaque controls. Some people might recommend using two forms, one fully transparent with opaque controls over another partially transparent, but I won't go into that.

The opacity of the form will change all controls in the form

Follow Genius Brain alternate example. That is the only way to achieve partial transparency, and so on.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM