WinForm中如何制作不规则窗体(C#的),急~~~ 如题:在WinForm中,如何自己制作不规则的窗体?望高手指教 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 这个要去找皮肤网上有很多有的是要收费的,不过免费的还是能找到的skin 去找Skin.自己做的话,先要找好的美工来实现自己的Idea. codeproject上有的 我以前有看到 具体自己去找吧 相信每个编程爱好者都希望自己的程序不仅性能优越而且有一个美观的界面,一个区别于别人的程序的个性化的界面。然而以前烦琐的API调用和大量的代码使大家望而却步。现在好了,在C#中通过少量的代码就可以实现不规则窗体的制作。如果您有兴趣就接着往下看吧。文章在http://www.cnblogs.com/zwq194/archive/2009/05/03/1448280.html 特殊窗体制作: 制作任意形状窗体原理:重写当前窗体 OnPaint 方法using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using System.Runtime.InteropServices;namespace SpecialSharpWindows{ public partial class Form1 : Form { Bitmap bit; public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { bit = new Bitmap("heart.bmp"); bit.MakeTransparent(Color.Blue); } protected override void OnPaint(PaintEventArgs e) { e.Graphics.DrawImage((Image)bit, new Point(0, 0)); } private void label1_Click(object sender, EventArgs e) { this.Close(); } }} 附界面设计: #region Windows 窗体设计器生成的代码 /// <summary> /// 设计器支持所需的方法 - 不要 /// 使用代码编辑器修改此方法的内容。 /// </summary> private void InitializeComponent() { this.label1 = new System.Windows.Forms.Label(); this.SuspendLayout(); // // label1 // this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Location = new System.Drawing.Point(280, 42); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(17, 16); this.label1.TabIndex = 0; this.label1.Click += new System.EventHandler(this.label1_Click); // // Form1 // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.SystemColors.Control; this.ClientSize = new System.Drawing.Size(393, 317); this.Controls.Add(this.label1); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; this.Name = "Form1"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "字型窗体"; this.TransparencyKey = System.Drawing.SystemColors.Control; this.Load += new System.EventHandler(this.Form1_Load); this.ResumeLayout(false); } #endregion socket内网通信 很急很急 帮帮我 CE下调用GDI+双缓冲问题 c#怎么实现显示波形? 制作含有windows media player控件的项目的安装文件时,wmp.dll找不到依耐项 谁在用.net2005,帮我看一下里面有没有C#写的WINCE连接SQL例子程序,具体目录在题中。或者会的直接写一段给我,顶者有分!! 一个简单的oracle问题: 请教:编译FreeTextBox出现的问题 请问ASP.NET C# web编程学习网站???? 请问 "挂起的连接请求" 是什么???????? C# word图表导出疑问 c# gridview 删除所有选中行
网上有很多
有的是要收费的,不过免费的还是能找到的
skin
自己做的话,先要找好的美工来实现自己的Idea.
原理:重写当前窗体 OnPaint 方法using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;
namespace SpecialSharpWindows
{
public partial class Form1 : Form
{
Bitmap bit;
public Form1()
{
InitializeComponent();
} private void Form1_Load(object sender, EventArgs e)
{
bit = new Bitmap("heart.bmp");
bit.MakeTransparent(Color.Blue);
}
protected override void OnPaint(PaintEventArgs e)
{
e.Graphics.DrawImage((Image)bit, new Point(0, 0));
} private void label1_Click(object sender, EventArgs e)
{
this.Close();
}
}
} 附界面设计: #region Windows 窗体设计器生成的代码 /// <summary>
/// 设计器支持所需的方法 - 不要
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.label1 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// label1
//
this.label1.BackColor = System.Drawing.Color.Transparent;
this.label1.Location = new System.Drawing.Point(280, 42);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(17, 16);
this.label1.TabIndex = 0;
this.label1.Click += new System.EventHandler(this.label1_Click);
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.SystemColors.Control;
this.ClientSize = new System.Drawing.Size(393, 317);
this.Controls.Add(this.label1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Name = "Form1";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "字型窗体";
this.TransparencyKey = System.Drawing.SystemColors.Control;
this.Load += new System.EventHandler(this.Form1_Load);
this.ResumeLayout(false); } #endregion