本文实例讲述了C#编程实现带有Aero效果的窗体。分享给大家供大家参考,具体如下:
usingSystem.Runtime.InteropServices;//引用,放在哪不用说了吧.... [DllImport("dwmapi.dll")] publicstaticexternintDwmExtendFrameIntoClientArea(IntPtrhWnd,refMARGINSpMarinset); [StructLayout(LayoutKind.Sequential)] publicstructMARGINS { publicintRight; publicintleft; publicintTop; publicintBottom; } privatevoidForm1_Load(objectsender,EventArgse) { this.BackgroundImage=null; MARGINSmargins=newMARGINS(); margins.left=-1; margins.Right=-1; margins.Top=-1; margins.Bottom=-1; IntPtrhwnd=Handle; intresult=DwmExtendFrameIntoClientArea(hwnd,refmargins); this.BackColor=Color.Black; this.label1.Text="。。。"; this.label1.BackColor=Color.Transparent; this.label1.ForeColor=Color.White; }
更多关于C#相关内容感兴趣的读者可查看本站专题:《C#窗体操作技巧汇总》、《C#数据结构与算法教程》、《C#常见控件用法教程》、《C#面向对象程序设计入门教程》及《C#程序设计之线程使用技巧上述就是C#学习教程:C#编程实现带有Aero效果的窗体示例分享的全部内容,如果对大家有所用处且需要了解更多关于C#学习教程,希望大家多多关注—计算机技术网(www.ctvol.com)!
本文来自网络收集,不代表计算机技术网立场,如涉及侵权请联系管理员删除。
ctvol管理联系方式QQ:251552304
本文章地址:https://www.ctvol.com/cdevelopment/907922.html