资源简介
C# winform 单击与双击事件同时存在例子
在wiform中单击与双击事件是不可以同时存在的。
代码片段和文件信息
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Threading;
namespace WindowsFormsApplication13
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
skinEngine1.SkinFile = Application.StartupPath + @“/Silver.ssk“;
}
int count = 0;
bool isC = true;
Thread t;
private void textBox1_MouseDown(object sender MouseEventArgs e)
{
isC = true;
if ((Environment.TickCount - count) < 500)
{
Thread tt = new Thread(new ParameterizedThreadStart((o) =>
{
isC = false;
MessageBox.Show(“Ddddd“);
}));
tt.Name = “wolf1“;
tt.IsBackground = true;
tt.Priority = ThreadPriority.Highest;
tt.Start();
t.Abort();
}
t = new Thread(new ParameterizedThreadStart((o) =>
{
Thread.Sleep(1000);
if (Convert.ToBoolean(o))
{
MessageBox.Show(o.ToString());
}
}));
t.Name = “wolf“;
t.IsBackground = true;
t.Start(isC);
}
private void SetText(string s)
{
this.textBox1.Text = s;
}
private void textBox1_MouseUp(object sender MouseEventArgs e)
{
count = Environment.TickCount;
//if (e.Clicks == 2)
//{
// MessageBox.Show(“2222222222“);
//}
// Thread.Sleep(1000);
// MessageBox.Show(“Test“);
}
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1406 2012-09-20 15:21 WindowsFormsApplication13\WindowsFormsApplication13\Properties\AssemblyInfo.cs
文件 5612 2012-09-20 15:21 WindowsFormsApplication13\WindowsFormsApplication13\Properties\Resources.resx
文件 2900 2012-09-20 15:21 WindowsFormsApplication13\WindowsFormsApplication13\Properties\Resources.Designer.cs
文件 249 2012-09-20 15:21 WindowsFormsApplication13\WindowsFormsApplication13\Properties\Settings.settings
文件 1110 2012-09-20 15:21 WindowsFormsApplication13\WindowsFormsApplication13\Properties\Settings.Designer.cs
文件 1950 2012-09-26 21:25 WindowsFormsApplication13\WindowsFormsApplication13\Form1.cs
文件 4123 2012-09-26 20:06 WindowsFormsApplication13\WindowsFormsApplication13\Form1.Designer.cs
文件 506 2012-09-20 15:21 WindowsFormsApplication13\WindowsFormsApplication13\Program.cs
文件 3825 2012-09-20 15:24 WindowsFormsApplication13\WindowsFormsApplication13\WindowsFormsApplication13.csproj
文件 490 2010-03-17 22:39 WindowsFormsApplication13\WindowsFormsApplication13\bin\Debug\WindowsFormsApplication13.vshost.exe.manifest
文件 11608 2012-09-26 21:16 WindowsFormsApplication13\WindowsFormsApplication13\bin\Debug\WindowsFormsApplication13.vshost.exe
文件 14795 2008-07-26 11:12 WindowsFormsApplication13\WindowsFormsApplication13\bin\Debug\Silver.ssk
文件 516096 2008-07-26 09:25 WindowsFormsApplication13\WindowsFormsApplication13\bin\Debug\IrisSkin2.dll
文件 10240 2012-09-26 21:29 WindowsFormsApplication13\WindowsFormsApplication13\bin\Debug\WindowsFormsApplication13.exe
文件 22016 2012-09-26 21:29 WindowsFormsApplication13\WindowsFormsApplication13\bin\Debug\WindowsFormsApplication13.pdb
文件 6381 2012-09-26 21:29 WindowsFormsApplication13\WindowsFormsApplication13\obj\x86\Debug\DesignTimeResolveAssemblyReferencesInput.cache
文件 5862 2012-09-20 15:22 WindowsFormsApplication13\WindowsFormsApplication13\obj\x86\Debug\DesignTimeResolveAssemblyReferences.cache
文件 180 2012-09-26 21:29 WindowsFormsApplication13\WindowsFormsApplication13\obj\x86\Debug\WindowsFormsApplication13.Form1.resources
文件 180 2012-09-26 21:29 WindowsFormsApplication13\WindowsFormsApplication13\obj\x86\Debug\WindowsFormsApplication13.Properties.Resources.resources
文件 594 2012-09-26 21:29 WindowsFormsApplication13\WindowsFormsApplication13\obj\x86\Debug\GenerateResource-ResGen.read.1.tlog
文件 1042 2012-09-26 21:29 WindowsFormsApplication13\WindowsFormsApplication13\obj\x86\Debug\GenerateResource-ResGen.write.1.tlog
文件 22016 2012-09-26 21:29 WindowsFormsApplication13\WindowsFormsApplication13\obj\x86\Debug\WindowsFormsApplication13.pdb
文件 10240 2012-09-26 21:29 WindowsFormsApplication13\WindowsFormsApplication13\obj\x86\Debug\WindowsFormsApplication13.exe
文件 1435 2012-09-26 21:29 WindowsFormsApplication13\WindowsFormsApplication13\obj\x86\Debug\WindowsFormsApplication13.csproj.FileListAbsolute.txt
文件 6016 2012-09-26 20:06 WindowsFormsApplication13\WindowsFormsApplication13\Form1.resx
文件 917 2012-09-20 15:21 WindowsFormsApplication13\WindowsFormsApplication13.sln
..A..H. 19456 2012-09-26 20:34 WindowsFormsApplication13\WindowsFormsApplication13.suo
目录 0 2012-09-20 15:21 WindowsFormsApplication13\WindowsFormsApplication13\obj\x86\Debug\TempPE
目录 0 2012-09-20 15:21 WindowsFormsApplication13\WindowsFormsApplication13\obj\x86\Debug
目录 0 2012-09-20 15:21 WindowsFormsApplication13\WindowsFormsApplication13\bin\Debug
............此处省略9个文件信息
相关资源
- c#调用winapi实现WinForm中嵌入EXE程序
- WinForm PropertyGrid用法
- C# winform 朗读输入文本
- winform登陆界面展示
- C#TabControl控件实现窗体的整合与切换
- vb.net通过socket实现简易多人聊天室含
- Excel 中创建多个保存的Sheet
- winform加载等待界面
- winform propertyGrid
- C# Winform 即时通信基于Socket
- AddFlow for Winforms v2.3
- C#Winform自定义能自由输入且多列查询
- c# winform完美软键盘实现 软键盘
- C# winform简单易用的异步加载Loading效果
- 超炫C# loading
- c# winform 用鼠标画拉出来的虚线框鼠标
- winform电子签名
- A*算法WinForm实现
- winform 等待 特效 动画 窗体显示
- WinForm在PictrueBox控件上建立矩形选框裁
- C#winform画图程序附解决方案,挺不错
- c#单击按钮、滑轮滚动放大、缩小pi
- C# winform 人力资源管理系统 ,vs2010开
- c# winform 串口电子秤集成开发
- C#窗口实现百度云人脸识别
- C#获取实时天气预报
- 基于WinForm做的简单超市进货销售系统
- winform画图软件
- C# winform实现一个服务端和多个客户端
- C# WinForm DirectShow视频采集及图片抓取
评论
共有 条评论