vv
来源:互联网 发布:梁成军被双开 知乎 编辑:程序博客网 时间:2024/04/29 08:06
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;
namespace Rohan
{
class Program
{
[DllImport("User32.dll",EntryPoint="SendMessage")]
private static extern int SendMessage(
int hWnd, // handle to destination window
int Msg, // message
int wParam, // first message parameter
string lParam // second message parameter
);
[DllImport("User32.dll",EntryPoint="FindWindow")]
private static extern int FindWindow(string lpClassName,string
lpWindowName);
[DllImport("user32.dll", SetLastError = true)]
static extern IntPtr FindWindowEx(IntPtr hwndParent, IntPtr hwndChildAfter, string lpszClass, string lpszWindow);
[DllImport("user32.dll", SetLastError = true)]
public static extern IntPtr FindWindowEx(IntPtr parentHandle, IntPtr childAfter, string className, IntPtr windowTitle);
//定义消息常数
const int WM_GETTEXT = 0x000D;
const int WM_SETTEXT = 0x000C;
const int WM_CLICK = 0x00F5;
const int WM_SHOWDROPDOWN = 0x014D;//在窗体中声明消息常量
const int WM_SETCURSOR = 0x14F;
const int CB_FINDSTRING = 0x14C;
const int WM_LBUTTONDBLCLK = 0x203;//双击鼠标左键
static void Main(string[] args)
{
/*
string str = "NGSNLL";
int WINDOW_HANDLER = FindWindow(null, @"无标题 - 记事本");
if (WINDOW_HANDLER == 0)
{
throw new Exception("Could not find Main window!");
}
SendMessage(WINDOW_HANDLER, WM_SETTEXT, 0,str);
*/
int WINDOW_HANDLER = FindWindow(null, @"计算器");
int buttonhwnd = FindWindowEx(WINDOW_HANDLER, IntPtr.Zero, "C", "Button");
SendMessage(buttonhwnd,WM_LBUTTONDBLCLK, 0, null);
}
}
}
- vv
- vv
- vv
- vv
- vv发电公司的风格vv
- memcached命令行参数 -vv
- 下次VV的说法
- PV、UV、VV、CV
- git branch -vv
- PV,UV,VV 含义
- PV,UV,VV,IP解析
- 第三个翡翠城vv
- PV UV VV IP 区别
- CSDN第一篇博客_by vv
- PV、UV、VV、IP的区别
- PV、UV、VV、IP的区别
- PV、UV、VV、IP的区别
- 客户反馈可vv控告v看过
- MMI主题
- C++调用C#作成的dll
- spring的MVC配署
- Microsoft Windows 7切换多国语言残留问题
- Tree的使用
- vv
- 第一次
- Struts第一次课
- 云计算,之我想。
- 多次Autocomple
- supervise; Linux操作下的进程管理利器supervise; daemontoool
- 各种类型文件头特征码
- ubuntu 终端上网设置
- 哦