最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
一个Xp风格的表单类(一)
时间:2022-07-02 11:32:17 编辑:袖梨 来源:一聚教程网
其实是一个 无边框窗体,写成的表单类....但是外表看起来和普通的FORM完全一样.
呵呵. 最可惜的是,现在还没找到,在工具栏上放菜单的办法......哭....
下面是运行时候的图片..
我喜欢程序,更喜欢程序有个PL的界面....
但是网上似乎找不到详细的,关于此方面的教程或源码.
重绘时改用了双缓冲,在窗体上有动画的时候,重绘不会出现闪烁的现象了.
献丑一下,把源码贴出来,大家一起交流....
下面是引用,以及,声明的部分##########################################
using System;
using System.ComponentModel;
using System.Windows.Forms;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.IO;
using System.Runtime.InteropServices;
namespace XpFormOfApc
{
///
/// Form1 的摘要说明。
///
public class XpForm : System.Windows.Forms.Form
{
public delegate void SysHandler(object sender,System.EventArgs e);
public event SysHandler SysDoubleClick;
//############API设置窗口STYLE#############
private const int GWL_STYLE = (-16);
private const int WS_SYSMENU = 0x80000;
private const int WS_SIZEBOX = 0x40000;
private const int WS_MAXIMIZEBOX = 0x10000;
private const int WS_MINIMIZEBOX=0x20000;
[System.Runtime.InteropServices.DllImport("user32", EntryPoint="SetWindowLong")]
private static extern int SetWindowLongA(int hwnd, int nIndex, int dwNewLong);
//###########普通组件定义#################
private System.ComponentModel.IContainer components;
private System.Windows.Forms.ImageList imglist;
呵呵. 最可惜的是,现在还没找到,在工具栏上放菜单的办法......哭....
下面是运行时候的图片..
我喜欢程序,更喜欢程序有个PL的界面....
但是网上似乎找不到详细的,关于此方面的教程或源码.
重绘时改用了双缓冲,在窗体上有动画的时候,重绘不会出现闪烁的现象了.
献丑一下,把源码贴出来,大家一起交流....
下面是引用,以及,声明的部分##########################################
using System;
using System.ComponentModel;
using System.Windows.Forms;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.IO;
using System.Runtime.InteropServices;
namespace XpFormOfApc
{
///
/// Form1 的摘要说明。
///
public class XpForm : System.Windows.Forms.Form
{
public delegate void SysHandler(object sender,System.EventArgs e);
public event SysHandler SysDoubleClick;
//############API设置窗口STYLE#############
private const int GWL_STYLE = (-16);
private const int WS_SYSMENU = 0x80000;
private const int WS_SIZEBOX = 0x40000;
private const int WS_MAXIMIZEBOX = 0x10000;
private const int WS_MINIMIZEBOX=0x20000;
[System.Runtime.InteropServices.DllImport("user32", EntryPoint="SetWindowLong")]
private static extern int SetWindowLongA(int hwnd, int nIndex, int dwNewLong);
//###########普通组件定义#################
private System.ComponentModel.IContainer components;
private System.Windows.Forms.ImageList imglist;
相关文章
- 《弓箭传说2》新手玩法介绍 01-16
- 《地下城与勇士:起源》断桥烟雨多买多送活动内容一览 01-16
- 《差不多高手》醉拳龙技能特点分享 01-16
- 《鬼谷八荒》毕方尾羽解除限制道具推荐 01-16
- 《地下城与勇士:起源》阿拉德首次迎新春活动内容一览 01-16
- 《差不多高手》情圣技能特点分享 01-16