资源简介
winform 等待窗体 gif动画等待
代码片段和文件信息
using Fancky.Common;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace WindowsFormsApplication4
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
//开始执行
private void button1_Click(object sender EventArgs e)
{
//调用耗时工作同时,UI线程会阻塞,点击后面的按钮还是有效果的,只是要等待UI线程执行完耗时
//工作才会有响应。
//显示此等待框,只是一个假象。调用时候需要引用Fancky.Commom.dll(.net 4.5框架开发)在debug下有。源码不提供了,要源码QQ709737588
FrmWait.ShowWaitForm(this);
this.backgroundWorker.RunWorkerAsync();
}
//执行耗时任务
private void backgroundWorker_DoWork(object sender DoWorkEventArgs e)
{
//一般用BeginInvoke只是显示与UI相关才用,其他地方交给线程,这点我是写demo方便,就无所谓了,希望没误导你们!
this.BeginInvoke((MethodInvoker)(() =>
{
for (int i = 0; i < 1000000000; i++)
{
if (this.backgroundWorker.CancellationPending)
{
break;
}
}
}));
}
//耗时任务完成,关闭等待窗
private void backgroundWorker_RunWorkerCompleted(object sender RunWorkerCompletedEventArgs e)
{
FrmWait.CloseFrmWait();
}
//取消
private void button2_Click(object sender EventArgs e)
{
FrmWait.CloseFrmWait();
//this.backgroundWorker.CancelAsync();
}
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 187 2015-08-13 13:19 WindowsFormsApplication4\WindowsFormsApplication4\App.config
文件 15360 2015-08-13 11:58 WindowsFormsApplication4\WindowsFormsApplication4\bin\Debug\Fancky.Common.dll
文件 9728 2015-08-13 14:46 WindowsFormsApplication4\WindowsFormsApplication4\bin\Debug\WindowsFormsApplication4.exe
文件 187 2015-08-13 13:19 WindowsFormsApplication4\WindowsFormsApplication4\bin\Debug\WindowsFormsApplication4.exe.config
文件 26112 2015-08-13 14:46 WindowsFormsApplication4\WindowsFormsApplication4\bin\Debug\WindowsFormsApplication4.pdb
文件 22984 2015-08-13 14:46 WindowsFormsApplication4\WindowsFormsApplication4\bin\Debug\WindowsFormsApplication4.vshost.exe
文件 187 2015-08-13 13:19 WindowsFormsApplication4\WindowsFormsApplication4\bin\Debug\WindowsFormsApplication4.vshost.exe.config
文件 490 2014-01-13 21:31 WindowsFormsApplication4\WindowsFormsApplication4\bin\Debug\WindowsFormsApplication4.vshost.exe.manifest
文件 2032 2015-08-13 14:46 WindowsFormsApplication4\WindowsFormsApplication4\Form1.cs
文件 3238 2015-08-13 13:22 WindowsFormsApplication4\WindowsFormsApplication4\Form1.Designer.cs
文件 6021 2015-08-13 13:22 WindowsFormsApplication4\WindowsFormsApplication4\Form1.resx
文件 863 2015-08-13 13:19 WindowsFormsApplication4\WindowsFormsApplication4\obj\Debug\DesignTimeResolveAssemblyReferences.cache
文件 7204 2015-08-13 13:20 WindowsFormsApplication4\WindowsFormsApplication4\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache
文件 0 2015-08-13 13:19 WindowsFormsApplication4\WindowsFormsApplication4\obj\Debug\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
文件 0 2015-08-13 13:19 WindowsFormsApplication4\WindowsFormsApplication4\obj\Debug\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
文件 0 2015-08-13 13:19 WindowsFormsApplication4\WindowsFormsApplication4\obj\Debug\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
文件 1304 2015-08-13 14:46 WindowsFormsApplication4\WindowsFormsApplication4\obj\Debug\WindowsFormsApplication4.csproj.FileListAbsolute.txt
文件 975 2015-08-13 13:22 WindowsFormsApplication4\WindowsFormsApplication4\obj\Debug\WindowsFormsApplication4.csproj.GenerateResource.Cache
文件 7440 2015-08-13 13:22 WindowsFormsApplication4\WindowsFormsApplication4\obj\Debug\WindowsFormsApplication4.csprojResolveAssemblyReference.cache
文件 9728 2015-08-13 14:46 WindowsFormsApplication4\WindowsFormsApplication4\obj\Debug\WindowsFormsApplication4.exe
文件 180 2015-08-13 13:22 WindowsFormsApplication4\WindowsFormsApplication4\obj\Debug\WindowsFormsApplication4.Form1.resources
文件 26112 2015-08-13 14:46 WindowsFormsApplication4\WindowsFormsApplication4\obj\Debug\WindowsFormsApplication4.pdb
文件 180 2015-08-13 13:22 WindowsFormsApplication4\WindowsFormsApplication4\obj\Debug\WindowsFormsApplication4.Properties.Resources.resources
文件 536 2015-08-13 13:19 WindowsFormsApplication4\WindowsFormsApplication4\Program.cs
文件 1386 2015-08-13 13:19 WindowsFormsApplication4\WindowsFormsApplication4\Properties\AssemblyInfo.cs
文件 2900 2015-08-13 13:19 WindowsFormsApplication4\WindowsFormsApplication4\Properties\Resources.Designer.cs
文件 5612 2015-08-13 13:19 WindowsFormsApplication4\WindowsFormsApplication4\Properties\Resources.resx
文件 1111 2015-08-13 13:19 WindowsFormsApplication4\WindowsFormsApplication4\Properties\Settings.Designer.cs
文件 249 2015-08-13 13:19 WindowsFormsApplication4\WindowsFormsApplication4\Properties\Settings.settings
文件 3960 2015-08-13 13:22 WindowsFormsApplication4\WindowsFormsApplication4\WindowsFormsApplication4.csproj
............此处省略13个文件信息
相关资源
- c# winform usercontrol用户控件传值
- Q757416.zip VB.NET WinForms 如何让label中的
- winform自定义滚动条
- Winform MessageBox 自定义设计样式
- .net winform自动升级
- winform 自定义日期控件--(201903)
- winform跨界面传值
- RegexTextBox可验证文本框(.net c# winfo
- 仿QQ面板的WinForm窗体源代码
- C#_winform操作excel(打开、内嵌)
- C# winform 三层架构设计登陆小模块演示
- winform高效率的分页查询
- C#窗体程序对数据库的增删改查操作三
-
C# winform实现combox绑定xm
l实现级联数 - C#调用matlab画图,解决图像嵌入Winfo
- c#写的winform超级记事本
- C# Winform数值实时曲线完整
- Winform天气预报WebService根据IP地址自动
- C#图形界面汉诺塔Hanoi
- ZY_winform创建不规则窗体和控件源码
- 树形列表控件CSharp,WinForm
- C# Winform,FX3U-32M,FX3u-ENET-ADP,MC协议
- Winform 画多边形
- C# winform Socket 即时通讯
- C# winform 单击与双击事件同时存在
- c#调用winapi实现WinForm中嵌入EXE程序
- WinForm PropertyGrid用法
- C# winform 朗读输入文本
- winform登陆界面展示
- C#TabControl控件实现窗体的整合与切换
评论
共有 条评论