资源简介
WinForm界面美化浮动弹窗源码
源码描述:
运行环境:VS2010 NET2.0
技术特点: 透明界面美化 弹窗 登入框验证,注册表记录用户及密码,进度条,登入信息保存
功能描述:
1 登入界面功能:登入框验证,注册表记录用户及密码,进度条,winform登入信息保存
2 主界面功能:透明界面美化,透明按钮切换,用户信息传递,最大化,最小化,关闭,移动窗口,定时器,弹窗,页面传值
3 右下角浮动弹窗功能:透明界面美化, 透明按钮切换,关闭,移动窗口,页面传值
代码片段和文件信息
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;
using System.Drawing.Imaging;
using Product.Forms;
namespace Product
{
public partial class ArtDialog : Form
{
public ArtDialog()
{
InitializeComponent();
// 初始化提示框窗体的状态及位置
area = Screen.GetWorkingArea(this); // 获取显示器的工作区域,即显示器的桌面区域,不包括任务栏及停靠窗口和停靠工具栏
this.Left = area.Width - this.Width;
this.Top = area.Height;
}
Rectangle area = new Rectangle();
bool isStop = false; // 初始化提示框窗体为随时可上升
int step = 12; // 设置窗体每次上升与下降时的高度
int StayTime = 10; //设置窗体停靠的时间(单位为秒)
DateTime beginTime;
bool isClose = false; // 设置窗体是否关闭的状态标志位
private void ArtDialog_Load(object sender EventArgs e)
{
// 设置记录消息
this.labtitle.Text = title;
this.lbText.Text = Content;
this.timeDialog.Start();
this.panBody.BackgroundImage = Image.FromStream(Shared.AssemblyWinUI.GetManifestResourceStream(“Product.Resources.MainWin.ArtDialog.bg.png“));
Bitmap closeICO = new Bitmap(Bitmap.FromStream(Shared.AssemblyWinUI.GetManifestResourceStream(“Product.Resources.MainWin.ArtDialog.ArtDialog_Close.png“)));
this.btnClose.NormalImage = closeICO.Clone(new Rectangle(0 0 36 16) PixelFormat.Format64bppPArgb);
this.btnClose.MouseMoveImage = closeICO.Clone(new Rectangle(36 0 36 16) PixelFormat.Format64bppPArgb);
this.btnClose.MouseDownImage = closeICO.Clone(new Rectangle(72 0 36 16) PixelFormat.Format64bppPArgb);
}
public string Content { get; set; }
public string title { get; set; }
public DateTime DateTime { get; set; }
public string Url { get; set; }
#region 移动窗体
private void Win_MouseMove(object sender MouseEventArgs e)
{
if (WindowState == FormWindowState.Maximized) return;
((Control)sender).Cursor = Cursors.Default;
if (e.Button == MouseButtons.Left && e.Y <= SystemInformation.CaptionHeight)
{
Win32.ReleaseCapture();
Win32.SendMessage(Handle 274 61440 + 9 0);
}
}
#endregion
private void btnClose_Click(object sender EventArgs e)
{
isClose = true;
}
private void lbText_linkClicked(object sender linkLabellinkClickedEventArgs e)
{
MainWin item = (MainWin)this.Owner;
item.WebBrowserUrl(Url);
item.Show();
}
private void timeDialog_Tick(object sender EventArgs e)
{
// 如果状态为显示提示框(即isStop为false),则使其距离显示器的上部越来越小(即减小Top的值),窗体的位置及慢慢上升
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 156 2012-11-14 10:10 app.config
文件 4390 2012-11-14 10:10 ArtDialog.cs
文件 6213 2012-11-14 10:10 ArtDialog.Designer.cs
文件 6015 2012-11-14 10:10 ArtDialog.resx
文件 4945 2012-11-14 10:10 from.gif
文件 6957 2012-11-14 10:10 Login.cs
文件 12225 2012-11-14 10:10 Login.Designer.cs
文件 155637 2012-11-14 10:10 Login.resx
文件 99678 2012-11-14 10:10 logo.ico
文件 762 2012-11-14 10:10 MainWin.cs
文件 2723 2012-11-14 10:10 MainWin.Designer.cs
文件 156390 2012-11-14 10:10 MainWin.resx
文件 8335 2012-11-14 10:10 Product.csproj
文件 227 2012-11-14 10:10 Product.csproj.user
文件 1482 2012-11-14 10:10 Product.idc
文件 855 2012-11-14 10:10 Product.sln
文件 28160 2012-11-14 10:10 Product.suo
文件 491 2012-11-14 10:10 Program.cs
文件 863232 2012-11-14 10:10 bin\Debug\Product.exe
文件 156 2012-11-14 10:10 bin\Debug\Product.exe.config
文件 140800 2012-11-14 10:10 bin\Debug\Product.pdb
文件 11608 2012-11-14 10:10 bin\Debug\Product.vshost.exe
文件 156 2012-11-14 10:10 bin\Debug\Product.vshost.exe.config
文件 490 2012-11-14 10:10 bin\Debug\Product.vshost.exe.manifest
文件 2927616 2012-11-14 10:10 bin\Debug\System.Data.dll
文件 970752 2012-11-14 10:10 bin\Debug\System.Deployment.dll
文件 3190784 2012-11-14 10:10 bin\Debug\System.dll
文件 630784 2012-11-14 10:10 bin\Debug\System.Drawing.dll
文件 5025792 2012-11-14 10:10 bin\Debug\System.Windows.Forms.dll
文件 2048000 2012-11-14 10:10 bin\Debug\System.xm
文件 156 2012-11-14 10:10 bin\Release\Product.exe.config
............此处省略112个文件信息
- 上一篇:C#学生信息管理系统源码
- 下一篇:asp.net旅游网站源码
相关资源
- c# winform 自动登录 百度账户 源代码
- DirectX.Capturec# winform 操作摄像头录像附
- C# 五子棋程序 附带编程日记
- C# winform实现表数据导出到Excel表格
- C# WinForm读写INI文件
- C#处理png图片位深度和交错属性
- winform(c#)最全73种非常漂亮界面样式
- winform与内嵌echarts的数据交互,让数据
- winform分页控件
- winform materialskin好看的皮肤组件
- winform 皮肤
- C#全套皮肤一共73款(IrisSkin4)
- UI界面皮肤(winform)
- winform开发的人脸识别打卡系统
- winform下拉多选自定义控件(带全选)
- winform控件库
- C# winform简洁漂亮的图形界面库SunnyU
- C# 斑马标签打印 (WEBamp;WINFORM)
- winform shell编程
- winform实时获取网卡网速全部源码,获
- winform实现饼状图、柱状图、折线图(
- winform简单用户登录(带验证码)
- 输入框自动切换中文(C#winform)vs20
- winform右下角弹窗
- windorm 加载WPF控件 ,实现dxf文件显示
- C# 俄罗斯方块(winform)
- C# 贪吃蛇(winform)
- C# 五子棋(winform源码)
- Winform中嵌入excel
- C# 华容道 winform源码
评论
共有 条评论