C#編程實現(xiàn)帶有Aero效果的窗體示例
更新時間:2017年07月07日 10:24:16 作者:a771948524
這篇文章主要介紹了C#編程實現(xiàn)帶有Aero效果的窗體,涉及C#調(diào)用動態(tài)鏈接庫針對窗體屬性的相關(guān)操作技巧,需要的朋友可以參考下
本文實例講述了C#編程實現(xiàn)帶有Aero效果的窗體。分享給大家供大家參考,具體如下:
using System.Runtime.InteropServices;//引用,放在哪不用說了吧.... [DllImport("dwmapi.dll")] public static extern int DwmExtendFrameIntoClientArea(IntPtr hWnd, ref MARGINS pMarinset); [StructLayout(LayoutKind.Sequential)] public struct MARGINS { public int Right; public int left; public int Top; public int Bottom; } private void Form1_Load(object sender, EventArgs e) { this.BackgroundImage = null; MARGINS margins = new MARGINS(); margins.left = -1; margins.Right = -1; margins.Top = -1; margins.Bottom = -1; IntPtr hwnd = Handle; int result = DwmExtendFrameIntoClientArea(hwnd, ref margins); this.BackColor = Color.Black; this.label1.Text = "。。。"; this.label1.BackColor = Color.Transparent; this.label1.ForeColor = Color.White; }
更多關(guān)于C#相關(guān)內(nèi)容感興趣的讀者可查看本站專題:《C#窗體操作技巧匯總》、《C#數(shù)據(jù)結(jié)構(gòu)與算法教程》、《C#常見控件用法教程》、《C#面向?qū)ο蟪绦蛟O(shè)計入門教程》及《C#程序設(shè)計之線程使用技巧總結(jié)》
希望本文所述對大家C#程序設(shè)計有所幫助。
相關(guān)文章
C# winfrom 模擬ftp文件管理實現(xiàn)代碼
從網(wǎng)上找到的非常好用的模擬ftp管理代碼,整理了一下,希望對需要的人有幫助2014-01-01C# Directory.GetFiles()函數(shù)案例詳解
這篇文章主要介紹了C# Directory.GetFiles()函數(shù)案例詳解,本篇文章通過簡要的案例,講解了該項技術(shù)的了解與使用,以下就是詳細內(nèi)容,需要的朋友可以參考下2021-08-08C#使用動態(tài)規(guī)劃解決0-1背包問題實例分析
這篇文章主要介紹了C#使用動態(tài)規(guī)劃解決0-1背包問題,實例分析了C#動態(tài)規(guī)劃算法的實現(xiàn)技巧,具有一定參考借鑒價值,需要的朋友可以參考下2015-04-04Unity3D實現(xiàn)待機狀態(tài)圖片循環(huán)淡入淡出
這篇文章主要為大家詳細介紹了Unity3D實現(xiàn)待機狀態(tài)圖片循環(huán)淡入淡出,文中示例代碼介紹的非常詳細,具有一定的參考價值,感興趣的小伙伴們可以參考一下2020-04-04