11 2016 档案

用C#调用Windows API向指定窗口发送按键消息
摘要:一、调用Windows API。 C#下调用Windows API方法如下: 1、引入命名空间:using System.Runtime.InteropServices; 2、引用需要使用的方法,格式:[DllImport("DLL文件")]方法的声明; [DllImport("user32.dll 阅读全文

posted @ 2016-11-26 09:14 侠羽风云 阅读(4439) 评论(1) 推荐(0)

Win32 编程消息常量(C#)
摘要:public class WinMessages { #region 基本消息 public const int WM_NULL = 0x0000; public const int WM_CREATE = 0x0001; public const int WM_DESTROY = 0x0002; 阅读全文

posted @ 2016-11-25 16:41 侠羽风云 阅读(534) 评论(0) 推荐(0)

C#程序员开发WinForm必须知道的 Window 消息大全
摘要:不要以为下面的东西只有C++中才会用到哦! 消息,就是指Windows发出的一个通知,告诉应用程序某个事情发生了。例如,单击鼠标、改变窗口尺寸、按下键盘上的一个键都会使Windows发送一个消息给应用程序。 消息本身是作为一个记录传递给应用程序的,这个记录中包含了消息的类型以及其他信息。例如,对于单 阅读全文

posted @ 2016-11-25 16:26 侠羽风云 阅读(2424) 评论(0) 推荐(2)

C#通过SendMessage发送消息,改变其他程序的下拉框控件(ComboBox)的值
摘要:IntPtr cbh= new IntPtr(handle); //ComboBox的句柄 SendMessage(cbh, 0x014D, new IntPtr(-1), "需要选中的下拉文本值"); //改变ComboBox的值 阅读全文

posted @ 2016-11-25 15:36 侠羽风云 阅读(3813) 评论(1) 推荐(0)

C#常用 API函数大全
摘要:常用Windows API1. API之网络函数WNetAddConnection 创建同一个网络资源的永久性连接WNetAddConnection2 创建同一个网络资源的连接WNetAddConnection3 创建同一个网络资源的连接WNetCancelConnection 结束一个网络连接WN 阅读全文

posted @ 2016-11-25 15:17 侠羽风云 阅读(8127) 评论(0) 推荐(0)

C# Windows Api的一些方法 封装 以及 常用参数
摘要:using System;using System.Collections.Generic;using System.Drawing;using System.Diagnostics;using System.Windows.Forms;using System.Runtime.InteropSer 阅读全文

posted @ 2016-11-25 15:09 侠羽风云 阅读(1513) 评论(0) 推荐(0)

SendKeys发送组合键
摘要:使用: using System.Windows.Forms;//添加命名空间引用 { SendKeys.SendWait("{DOWN}"); ppt.ppt_sendkey("+{F5}");//全屏 表示SHIFT+F5的组合:加号直接代表shift键 ppt.ppt_sendkey("{ES 阅读全文

posted @ 2016-11-23 16:16 侠羽风云 阅读(3448) 评论(0) 推荐(0)

导航