转载请注明来源:https://www.cnblogs.com/hookjc/

SendMessage(hWnd,WM_SETFOCUS,0,0); 
SendMessage(hWnd,WM_ACTIVATE,1,0);

SendMessage(hWnd,WM_KEYDOWN,VK_TAB,0x000f0001);
SendMessage(hWnd,WM_CHAR,VK_TAB,0x000f0001);
SendMessage(hWnd,WM_KEYUP,VK_TAB,0xc00f0001);
SendMessage(hWnd,WM_KEYDOWN,VK_TAB,0x000f0001);
SendMessage(hWnd,WM_CHAR,VK_TAB,0x000f0001);
SendMessage(hWnd,WM_KEYUP,VK_TAB,0xc00f0001);
SendMessage(hWnd,WM_KEYDOWN,VK_TAB,0x000f0001);
SendMessage(hWnd,WM_CHAR,VK_TAB,0x000f0001);
SendMessage(hWnd,WM_KEYUP,VK_TAB,0xc00f0001);
SendMessage(hWnd,WM_KEYDOWN,VK_RETURN,0x001c0001); 
SendMessage(hWnd,WM_CHAR,VK_RETURN,0x001c0001);
SendMessage(HWND, WM_SYSCOMMAND, SC_MAXIMIZE, ByVal 0&)    '最大化

SendMessage HWND, WM_SHOWWINDOW, SW_HIDE, vbNull '隐藏窗体
SendMessage HWND, WM_SHOWWINDOW, SW_NORMAL, vbNull '显示窗体

SendMessage(HWND, CB_SHOWDROPDOWN, -1, -1) '显示Combo1.hwnd下拉列表

SendMessage Combo1.hWnd, CB_SHOWDROPDOWN, 0, 0     '不下拉

SendMessage(HWND, WM_SYSCOMMAND, SC_CLOSE, ByVal 0&)   '关闭
SendMessage(HWND, WM_SYSCOMMAND, SC_MINIMIZE, ByVal 0&) '最小化
SendMessage(HWND, WM_PASTE, 0, 0) '粘贴
SendMessage(HWND, WM_COPY, 0, 0)   '复制
SendMessage(HWND, WM_UNDO, 0, 0)    '撤消
SendMessage(HWND, WM_SETTEXT, 0, ByVal new_caption)     'f发文本信息
SendMessage(HWND, WM_KEYDOWN, Asc("b"), 0&)    '发送按键 只能用于 控件 不能用与整个窗体或进程
SendMessage(HWND, WM_LBUTTONDOWN, MK_LBUTTON, ByVal &H10001) '鼠标模拟
WindowFromPoint(Cursor.x, Cursor.y) '获得鼠标当前句柄
GetPixel(dc, Cursor.x, Cursor.y) '获取鼠标点颜色
SendMessage(HWND, WM_CUT, 0, 0)    '剪切 但单击按钮会使其失去焦点 这里不做演示

获得光标位置和字符个数.
Cpos = SendMessage(Text1.hwnd, 187, -1, 0) '光标所在行的首字符在文本中的位置
Lpos = SendMessage(Text1.hwnd, 201, Cpos, 0) '光标所在的行号
Line = SendMessage(Text1.hwnd, 193, Cpos, 0) '这行的字符数.
SendMessage Handle, WM_SYSCOMMAND, SC_MONITORPOWER, 0 '关闭显示器.
SendMessage Handle, WM_SYSCOMMAND, SC_MONITORPOWER, -1 '打开显示器
SendMessage(mText.hwnd, EM_GETRECT, 0, rc) '获得窗口区域的边界

SendMessage hWnd, WM_KEYDOWN, VK_CONTROL, ByVal 0& 
SendMessage hWnd, WM_KEYDOWN, VK_X, ByVal 0& 
SendMessage hWnd, WM_KEYUP, VK_X, ByVal 0& 
SendMessage hWnd, WM_KEYUP, VK_CONTROL, ByVal 0&

================
Public Const VK_LBUTTON = &H1
Public Const VK_RBUTTON = &H2
Public Const VK_CANCEL = &H3
Public Const VK_MBUTTON = &H4
Public Const VK_BACK = &H8
Public Const VK_TAB = &H9
Public Const VK_CLEAR = &HC
Public Const VK_RETURN = &HD
Public Const VK_SHIFT = &H10
Public Const VK_CONTROL = &H11
Public Const VK_MENU = &H12
Public Const VK_PAUSE = &H13
Public Const VK_CAPITAL = &H14
Public Const VK_ESCAPE = &H1B
Public Const VK_SPACE = &H20
Public Const VK_PRIOR = &H21
Public Const VK_NEXT = &H22
Public Const VK_END = &H23
Public Const VK_HOME = &H24
Public Const VK_LEFT = &H25
Public Const VK_UP = &H26
Public Const VK_RIGHT = &H27
Public Const VK_DOWN = &H28
Public Const VK_Select = &H29
Public Const VK_PRINT = &H2A
Public Const VK_EXECUTE = &H2B
Public Const VK_SNAPSHOT = &H2C
Public Const VK_Insert = &H2D
Public Const VK_Delete = &H2E
Public Const VK_HELP = &H2F
Public Const VK_0 = &H30
Public Const VK_1 = &H31
Public Const VK_2 = &H32
Public Const VK_3 = &H33
Public Const VK_4 = &H34
Public Const VK_5 = &H35
Public Const VK_6 = &H36
Public Const VK_7 = &H37
Public Const VK_8 = &H38
Public Const VK_9 = &H39
Public Const VK_A = &H41
Public Const VK_B = &H42
Public Const VK_C = &H43
Public Const VK_D = &H44
Public Const VK_E = &H45
Public Const VK_F = &H46
Public Const VK_G = &H47
Public Const VK_H = &H48
Public Const VK_I = &H49
Public Const VK_J = &H4A
Public Const VK_K = &H4B
Public Const VK_L = &H4C
Public Const VK_M = &H4D
Public Const VK_N = &H4E
Public Const VK_O = &H4F
Public Const VK_P = &H50
Public Const VK_Q = &H51
Public Const VK_R = &H52
Public Const VK_S = &H53
Public Const VK_T = &H54
Public Const VK_U = &H55
Public Const VK_V = &H56
Public Const VK_W = &H57
Public Const VK_X = &H58
Public Const VK_Y = &H59
Public Const VK_Z = &H5A
Public Const VK_STARTKEY = &H5B
Public Const VK_CONTEXTKEY = &H5D
Public Const VK_NUMPAD0 = &H60
Public Const VK_NUMPAD1 = &H61
Public Const VK_NUMPAD2 = &H62
Public Const VK_NUMPAD3 = &H63
Public Const VK_NUMPAD4 = &H64
Public Const VK_NUMPAD5 = &H65
Public Const VK_NUMPAD6 = &H66
Public Const VK_NUMPAD7 = &H67
Public Const VK_NUMPAD8 = &H68
Public Const VK_NUMPAD9 = &H69
Public Const VK_MULTIPLY = &H6A
Public Const VK_ADD = &H6B
Public Const VK_SEPARATOR = &H6C
Public Const VK_SUBTRACT = &H6D
Public Const VK_DECIMAL = &H6E
Public Const VK_DIVIDE = &H6F
Public Const VK_F1 = &H70
Public Const VK_F2 = &H71
Public Const VK_F3 = &H72
Public Const VK_F4 = &H73
Public Const VK_F5 = &H74
Public Const VK_F6 = &H75
Public Const VK_F7 = &H76
Public Const VK_F8 = &H77
Public Const VK_F9 = &H78
Public Const VK_F10 = &H79
Public Const VK_F11 = &H7A
Public Const VK_F12 = &H7B
Public Const VK_F13 = &H7C
Public Const VK_F14 = &H7D
Public Const VK_F15 = &H7E
Public Const VK_F16 = &H7F
Public Const VK_F17 = &H80
Public Const VK_F18 = &H81
Public Const VK_F19 = &H82
Public Const VK_F20 = &H83
Public Const VK_F21 = &H84
Public Const VK_F22 = &H85
Public Const VK_F23 = &H86
Public Const VK_F24 = &H87
Public Const VK_NUMLOCK = &H90
Public Const VK_OEM_SCROLL = &H91
Public Const VK_OEM_1 = &HBA
Public Const VK_OEM_PLUS = &HBB
Public Const VK_OEM_COMMA = &HBC
Public Const VK_OEM_MINUS = &HBD
Public Const VK_OEM_PERIOD = &HBE
Public Const VK_OEM_2 = &HBF
Public Const VK_OEM_3 = &HC0
Public Const VK_OEM_4 = &HDB
Public Const VK_OEM_5 = &HDC
Public Const VK_OEM_6 = &HDD
Public Const VK_OEM_7 = &HDE
Public Const VK_OEM_8 = &HDF
Public Const VK_ICO_F17 = &HE0
Public Const VK_ICO_F18 = &HE1
Public Const VK_OEM102 = &HE2
Public Const VK_ICO_HELP = &HE3
Public Const VK_ICO_00 = &HE4
Public Const VK_ICO_CLEAR = &HE6
Public Const VK_OEM_RESET = &HE9
Public Const VK_OEM_JUMP = &HEA
Public Const VK_OEM_PA1 = &HEB
Public Const VK_OEM_PA2 = &HEC
Public Const VK_OEM_PA3 = &HED
Public Const VK_OEM_WSCTRL = &HEE
Public Const VK_OEM_CUSEL = &HEF
Public Const VK_OEM_ATTN = &HF0
Public Const VK_OEM_FINNISH = &HF1
Public Const VK_OEM_COPY = &HF2
Public Const VK_OEM_AUTO = &HF3
Public Const VK_OEM_ENLW = &HF4
Public Const VK_OEM_BACKTAB = &HF5
Public Const VK_ATTN = &HF6
Public Const VK_CRSEL = &HF7
Public Const VK_EXSEL = &HF8
Public Const VK_EREOF = &HF9
Public Const VK_PLAY = &HFA
Public Const VK_ZOOM = &HFB
Public Const VK_NONAME = &HFC
Public Const VK_PA1 = &HFD
Public Const VK_OEM_CLEAR = &HFE

来源:python脚本自动迁移

SendMessage 键值的更多相关文章

  1. Android Spinner 绑定键值对

    这里给大家提供下绑定 spinner键值对的方法. 首先创建绑定模型BaseItem public class BaseItem { public BaseItem(Integer id,String ...

  2. STL: unordered_map 自定义键值使用

    使用Windows下 RECT 类型做unordered_map 键值 1. Hash 函数 计算自定义类型的hash值. struct hash_RECT { size_t operator()(c ...

  3. Learning Spark 第四章——键值对处理

    本章主要介绍Spark如何处理键值对.K-V RDDs通常用于聚集操作,使用相同的key聚集或者对不同的RDD进行聚集.部分情况下,需要将spark中的数据记录转换为键值对然后进行聚集处理.我们也会对 ...

  4. php 二位数组按某个键值排序

    $arr=[ array( 'name'=>'小坏龙', 'age'=>28 ), array( 'name'=>'小坏龙2', 'age'=>14 ), array( 'na ...

  5. etcd:用于服务发现的键值存储系统

    etcd是一个高可用的键值存储系统,主要用于共享配置和服务发现.etcd是由CoreOS开发并维护的,灵感来自于 ZooKeeper 和 Doozer,它使用Go语言编写,并通过Raft一致性算法处理 ...

  6. EntityFramework 外键值映射

    如果在 EF OnModelCreating 中配置了实体外键映射,也就是 SQL Server 中的 ForeignKey,那么我们在添加实体的时候,主实体的主键值会自动映射到子实体的外键值,并且这 ...

  7. angularJS操作键值对象(类似java的hashmap)填坑小结

    前言: 我们知道java的hashmap中使用最多的是put(...),get(...)以及remove()方法,那么在angularJS中如何创造(使用)这样一个对象呢 思路分析: 我们知道在jav ...

  8. js获取键盘按下的键值event.keyCode,event.charCode,event.which的兼容性

    js获取键盘按下的键值有event.keyCode,event.charCode和event.which 其中: 谷歌浏览器对event.keyCode,event.charCode和event.wh ...

  9. 【原】Learning Spark (Python版) 学习笔记(二)----键值对、数据读取与保存、共享特性

    本来应该上周更新的,结果碰上五一,懒癌发作,就推迟了 = =.以后还是要按时完成任务.废话不多说,第四章-第六章主要讲了三个内容:键值对.数据读取与保存与Spark的两个共享特性(累加器和广播变量). ...

随机推荐

  1. CLION 使用自己的makefile来运行

    之前参考过这里和这里,都是说要使用add_custom_target,无奈看不懂 但是前一篇里说它参考的是stackoverflow上的回答,去原帖里发现后来更新的第二高票答案!!!非常好用!!! 在 ...

  2. Java EE数据持久化框架 • 【第4章 MyBatis动态SQL】

    全部章节   >>>> 本章目录 4.1 MyBatis动态标签 4.1.1  MyBatis动态标签介绍 4.1.2 < if >标签 4.1.3 update语 ...

  3. Java EE数据持久化框架作业目录(作业笔记)

    第1章 MyBatis入门>>> 1.1.4 在Eclipse中搭建MyBatis基本开发环境 1.2.5 使用MyBatis查询所有职员信息 1.3.3 获取id值为1的角色信息. ...

  4. 在页面中添加两个 <select> 标签,用来显示年份和月份;同时添加两个 <ul> 标签,一个用来显示星期,另一个用来显示日期 在 JavaScript 脚本中动态添加年份和月份,获取当前日期的年份

    查看本章节 查看作业目录 需求说明: 使用 JavaScript 中的 Date 对象,在页面上显示一个万年历.选择不同的年份和月份,在页面中显示当前月的日历 实现思路: 在页面中添加两个 <s ...

  5. HTML5 +Java基础 大一结业认证考试试题 - 云南农业职业技术学院 - 互联网技术学院 - 美和易思校企合作专业

     第1题 [单选题][0.33分][概念理解] 关于java中的逻辑运算符,下列说法正确的是 逻辑运算符||.&&.!都是用于连接两个关系表达式</p> 当&&am ...

  6. 【MySQL作业】分组查询 group by 子句——美和易思分组查询应用习题

    点击打开所使用到的数据库>>> 1.按照商品类型分组统计商品数量和平均单价,并按平均单价升序显示. -- 按照商品类型分组统计商品数量和平均单价,并按平均单价升序显示: select ...

  7. Docker_安装和卸载(2)

    1.检查是否安装docker docker -v 下图为已安装docker的结果 下图为未安装docker的结果 2.卸载docker 查看已安装的版本 yum list installed | gr ...

  8. Servlet简单实现开发部署过程

    注:图片如果损坏,点击文章链接:https://www.toutiao.com/i6512008683445027331/ 主要是从下面三个步骤实现我们的预期: (1)构建开发环境: (2)开发Ser ...

  9. textarea换行符转换

    /** * @description textarea换行符转指定字符 * @param str:要放到textarea的字符串 * @param code:要转换成换行的字符,默认为',' */ e ...

  10. 论文翻译:2020_FLGCNN: A novel fully convolutional neural network for end-to-end monaural speech enhancement with utterance-based objective functions

    论文地址:FLGCNN:一种新颖的全卷积神经网络,用于基于话语的目标函数的端到端单耳语音增强 论文代码:https://github.com/LXP-Never/FLGCCRN(非官方复现) 引用格式 ...