久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

半透明PNG作為啟動畫面

Semi Transparent PNG as Splash Screen(半透明PNG作為啟動畫面)
本文介紹了半透明PNG作為啟動畫面的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我正在嘗試使 Splash Screen 4 成為 Win 應用程序.

I'm trying to make a Splash Screen 4 an Win application.

我的設置:

表單邊框樣式設置為無.起始位置是屏幕中心.表單的背景圖片設置為 PNG 文件,帶有圓角邊緣和內置"投影.

form border style is set to none. start position is screen center. background image of the form is set to a PNG file, with rounded edges and a "build in" drop shadow.

在我設置的代碼中:

this.SetStyle( ControlStyles.AllPaintingInWmPaint, true);
this.SetStyle( ControlStyles.UserPaint, true);
this.SetStyle( ControlStyles.DoubleBuffer, true);
this.SetStyle( ControlStyles.SupportsTransparentBackColor, true);

this.AllowTransparency = true;
this.BackColor = Color.Transparent;

但是當我測試時,它說表單不能有透明的背景顏色.

but when i test, it says that the form can't have a transparent background color.

我不想設置透明鍵,因為它會導致 dropschadow 出現問題(png 的半透明部分)

i DO NOT want to set a transparency key, cuz it causes trouble with the dropschadow ( semi transparent part of the png )

我也不想將不透明度設置為 0%,因為它也會影響我的 PNG.

also i dont want to set opacity to 0%, cuz it also effects my PNG.

事實上,我只希望我的 png 顯示為窗口.另外,它上面還會有一些動態文本,將來還會有一個進程欄......

in fact i just want ONLY my png shown as the window. additionaly there will be some dynamic text on top of it and a process bar in the future...

有什么想法嗎?如何判斷表單可以有透明背景就像ADOBE PHOTOSHOP CS5的閃屏

Any ideas? how to tell the form that is CAN have transparent background like the splash screen of ADOBE PHOTOSHOP CS5

推薦答案

我也花了幾個小時在 Win Forms 中尋找一種方法,所以我想我會分享我的解決方案.

I spent a few hours looking for a way to do this in Win Forms as well so I thought I would share my solution.

我的初始屏幕圖像是一個 .png,具有透明背景和在透明背景上延伸的各種陰影.使用不常見的顏色作為控件的背景以及透明度鍵會在半透明陰影下方留下難看的補丁.

My splash screen image is a .png with a transparent background and various shadows that extend over the transparent background. Using uncommon colors as the background of the control along with a transparency key left ugly patches underneath the semi-transparent shadows.

通過將表單的背景圖像設置為我想要顯示的圖像并覆蓋 OnPaintBackground 函數,我能夠獲得所需的結果,如下所示:

I was able to get the desired result by setting the background image of the form to the image I wanted to display and overriding the OnPaintBackground function like so:

    bool painted = false
    protected override void OnPaintBackground(System.Windows.Forms.PaintEventArgs e)
    {
        if (painted) return;
        e.Graphics.DrawImage(BackgroundImage, new System.Drawing.Point(0, 0));
        painted = true;
    }

我只是碰到這個舊線程,因為它是我嘗試的幾個不同關鍵字組合的最高 Google 結果.

I'm only bumping this old thread because it's the top Google result for a few different keyword combos that I tried.

另請參閱 透明啟動畫面,這是我找到此解決方案的地方來自另一個 SO 帖子.

See also Transparent Splash Screen which is where I found this solution from another SO post.

這篇關于半透明PNG作為啟動畫面的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

Is there a C# library that will perform the Excel NORMINV function?(是否有執行 Excel NORMINV 函數的 C# 庫?)
Select x random elements from a weighted list in C# (without replacement)(從 C# 中的加權列表中選擇 x 個隨機元素(無需替換))
Create a summary description of a schedule given a list of shifts(給定輪班列表,創建時間表的摘要描述)
C# Normal Random Number(C# 普通隨機數)
Standard deviation of generic list?(通用列表的標準偏差?)
AsyncCTP: Creating a class that is IAwaitable(AsyncCTP:創建一個 IAwaitable 的類)
主站蜘蛛池模板: 国产偷录叫床高潮录音 | 国产一区二区三区在线看 | h视频在线免费 | 国产精品高潮呻吟久久久久 | av网站在线免费观看 | 国产成人网 | 天天曰天天曰 | 九九九精品视频 | 91精品国产欧美一区二区成人 | 欧美国产91| 亚洲美女在线视频 | 欧美一级全黄 | 黄色在线观看 | 麻豆精品久久久 | www中文字幕 | 久久久国产一区二区三区四区小说 | 蜜桃一区 | 久久噜 | 国产福利资源在线 | 亚洲精品在线观 | 9久久精品 | 成人免费三级电影 | 久草视频在线播放 | 国产第1页 | 成人h动漫精品一区二区器材 | 国产精品久久久久久久久久久久 | 欧美日韩精品一区二区 | 国产精品高潮呻吟久久av黑人 | 亚卅毛片 | a级片在线观看 | 青青草综合网 | 四虎永久免费在线 | 九九亚洲| 最新日韩在线视频 | 国产成人精品一区二区三区网站观看 | 国产精品久久久久久久久久软件 | wwwww在线观看 | 国产香蕉视频 | 精品国产乱码久久久久久闺蜜 | 97精品超碰一区二区三区 | 亚洲国产日韩一区 |