zoukankan
html css js c++ java
wpf学习delegate windows事件
using
System;
using
System.Windows;
using
System.Windows.Input;
namespace
wpftest
{
/**/
///
<summary>
///
Description of Class1.
///
</summary>
public
class
Class1
{
public
Class1()
{
}
[STAThread]
public
static
void
Main()
{
Window win
=
new
Window();
win.Title
=
"
hello wpf
"
;
win.Show();
win.MouseDown
+=
new
MouseButtonEventHandler(onwinmousedonw);
Application app
=
new
Application();
app.Run(win);
}
static
void
onwinmousedonw(
object
sender,MouseButtonEventArgs args)
{
Window bb
=
sender
as
Window;
string
template
=
"
windows mouse {0} click at point{1}
"
;
string
msg
=
string
.Format(template,args.ChangedButton,args.GetPosition(bb));
MessageBox.Show(msg,bb.Title);
}
}
}
查看全文
相关阅读:
工业大数据的理论体系
我的偶像王坚博士,一位执着的学者!
云计算遇上区块链,会产生怎样的能量和火花?
管好超时才能做好异步
“AliOS之父”——阿里巴巴王坚博士
Centos7开放及查看端口
直连不同网段
实施:帧中继
网线标准
以太网的帧结构
原文地址:https://www.cnblogs.com/sunbingzibo/p/961640.html
最新文章
窗口相关概念和对应关系
窗口相关概念和对应关系
对话框(VC_Win32)
对话框(VC_Win32)
系统消息
系统消息
什么是进步
体制内公文写作你有什么好的经验?
胡韦《求助马克思》第二章
乔布斯2005年斯坦福大学毕业演讲(高清,中英文字幕)
热门文章
LICEcap(小巧GIF录制必备工具)
明日歌
努力到什么程度
心灵鸡汤还是有用的
drcom校园网络环境中使用路由器
企业将业务迁移到云端时的核心考虑因素
每个Web开发人员都应该阅读的10本书
HTML5开发能不能取代原生开发?
浅谈HTML5技术优点及未来发展趋势
王坚博士眼中的中国技术与我眼中的王坚博士
Copyright © 2011-2022 走看看