怎么用C#创建一个中空的窗体 c#自定义窗体 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 http://www.cnblogs.com/jxsoft/archive/2011/03/09/1978153.html 给窗体设置一个背景色,然后设置窗体TransparencyKey属性和背景色一个颜色,然后窗体就是透明的了 http://www.cnblogs.com/alexis/archive/2010/08/29/1811826.html http://www.cnblogs.com/alexis/archive/2010/08/29/1811826.html public partial class Form1 : Form{ const int SC_MOVE = 0xF010; const int HTCAPTION = 0x0002; const int WM_SYSCOMMAND = 0x0112; [DllImport("user32.dll")] public static extern bool SendMessage(IntPtr hwnd, int wMsg, int wParam, int lParam); [DllImport("user32.dll")] public static extern bool ReleaseCapture(); Bitmap bgImage; public Form1() { InitializeComponent(); bgImage = Properties.Resources.pic; FormBorderStyle = FormBorderStyle.None; BackColor = Color.White; TransparencyKey = Color.White; Paint += new PaintEventHandler(Form1_Paint); MouseDown += new MouseEventHandler(Form1_MouseDown); } void Form1_MouseDown(object sender, MouseEventArgs e) { ReleaseCapture(); SendMessage(Handle, WM_SYSCOMMAND, SC_MOVE + HTCAPTION, 0); } void Form1_Paint(object sender, PaintEventArgs e) { e.Graphics.DrawImage(bgImage, 0, 0, bgImage.Width, bgImage.Height); }} C# 网络编程 c#里sql修改记录问题 vs运行时问题,期待IDE配置高手帮忙 怎么能让C#程序可扩充 导出Excel时,数字类型数据被转换为字符类型,导致Excel公式无法计算 .NET有给类添加属性的工具吗? 专家帮忙。关于数组和指针 C# WPF 如何通过B窗体动态向A窗体增加控件 这是什么语言写的? 50GB电脑教程、C#资料免费下载 建立VS2010数据库的问题,求大神指点 音频的语音区是多少
public partial class Form1 : Form
{
const int SC_MOVE = 0xF010;
const int HTCAPTION = 0x0002;
const int WM_SYSCOMMAND = 0x0112;
[DllImport("user32.dll")]
public static extern bool SendMessage(IntPtr hwnd, int wMsg, int wParam, int lParam);
[DllImport("user32.dll")]
public static extern bool ReleaseCapture(); Bitmap bgImage;
public Form1()
{
InitializeComponent(); bgImage = Properties.Resources.pic; FormBorderStyle = FormBorderStyle.None;
BackColor = Color.White;
TransparencyKey = Color.White;
Paint += new PaintEventHandler(Form1_Paint);
MouseDown += new MouseEventHandler(Form1_MouseDown);
} void Form1_MouseDown(object sender, MouseEventArgs e)
{
ReleaseCapture();
SendMessage(Handle, WM_SYSCOMMAND, SC_MOVE + HTCAPTION, 0);
} void Form1_Paint(object sender, PaintEventArgs e)
{
e.Graphics.DrawImage(bgImage, 0, 0, bgImage.Width, bgImage.Height);
}
}