教程集 www.jiaochengji.com
教程集 >  操作系统  >  windows  >  正文 DotNet中不规则窗体的创建方法

DotNet中不规则窗体的创建方法

发布时间:2019-12-10   编辑:jiaochengji.com
教程集为您提供DotNet中不规则窗体的创建方法等资源,欢迎您收藏本站,我们将为您提供最新的DotNet中不规则窗体的创建方法资源
ShapedForms
http://www.c-sharpcorner.com/Graphics/Shaped1.jpg

Today Windows always appear with a rectangular shape. What if you could have a window that was shaped like a circle, a square or a triangle or any shape you want.
I discovered tonight you could use regions to in effect clip a window to any shape you want. The effect is almost to look like an active desktop component as you cannot move these shaped windows. Having done this and created some animation on your desktop I wonder if you could load a bitmap as the basis for your windows. Note you lose the titlebars etc but it looks like a useful technique.
Here is the source code. Apologies if its messy but its been a long night searching for how to do this. I have attached the exe as well for Beta 2
Enjoy
John
Source Code:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Drawing.Drawing2D;
namespace ShapedForm
{
        /// <summary>
        /// Summary description for Form1.
        /// </summary>
        public class Form1 : System.Windows.Forms.Form
        {
       private System.Windows.Forms.Timer timer1;
       private System.ComponentModel.IContainer components;

您可能感兴趣的文章:
DotNet中不规则窗体的创建方法
Dotnet WinForm 建立 FAQ1(转贴)(编程技巧)
dotNET 程序奔向Window XP,体验绚丽的外表?
解析jquery获取父窗口的元素
JQuery FlexiGrid的asp.net完美解决方案 dotNetFlexGrid-.Net原生的异步表格控件
PHP 函数的声明与用法
C# in VS2008从入门到提高Step By Step(一)VS2008的安装
.NET 窗体之间的交互
C#开源资源
JS父子窗口相互取值与赋值的方法参考

[关闭]
~ ~