c#通过SendMessage(Win API)发送消息
来源:互联网 发布:经济学就业 知乎 编辑:程序博客网 时间:2024/04/29 09:35
PART1:
来自MSDN的问答:
问:
Before, I had used SendMessage API in VB 6.0.
Now, I want quick search a string in listbox by Sendmessage API and use C# language but I don't know how to do.
Please, help me. Thanks
PS: Sorry, my english is very poor.
答:
You need to import the function using:
[DllImport("user32.dll")]
public static extern int SendMessage(
int hWnd, // handle to destination window
uint Msg, // message
long wParam, // first message parameter
long lParam // second message parameter
);
and define the message that you want to send like:
public const int <WM_YOURMESSAGE> = <yourvalue>;
and then call SendMessage like any other function.
PART2:
函数原型:
http://www.apicx.com/show.php?id=SendMessage
PART3:
Windows消息类型,见另一篇记录:
- c#通过SendMessage(Win API)发送消息
- Win32 API消息函数:SendMessage(发送消息)
- c#通过SendMessage发送消息,改变其他程序的下拉框控件(ComboBox)的值
- <Win32 API> 发送消息 SendMessage/PostMessage
- 应用程序间发送消息 c# SendMessage WM_COPYDATA
- C#调用WinAPI发送消息SendMessage
- 进程之间通过CWnd::SendMessage(WM_COPYDATA,*,*)发送和获取消息
- SendMessage(利用反射)发送消息
- sendmessage 发送消息
- SendMessage()发送消息
- c# 使用SendMessage向另一进程发送WM_COPYDATA消息通信
- C# 发送消息SendKeys、SendMessage、keybd_event的用法
- c# 使用SendMessage向另一进程发送WM_COPYDATA消息通信
- c++ 消息传递(通过SendMessage)
- 发送消息(SendMessage)常识普及
- Win32 API消息函数:SendMessage
- Win32消息处理API---SendMessage
- C#调用API接收发送窗口消息
- Remove Duplicates from Sorted Array II
- AlertDialog
- 《挑战程序设计》一些小练习,均AC,不断更新
- 使用Struts2+Hibernate开发学生信息管理系统
- JPA hibernate spring repository pgsql java 工程(三):数据表分区与自动创建:策略
- c#通过SendMessage(Win API)发送消息
- myeclipse配置下面没有tomcat选项,如何解决
- 使用GitHub
- ios9使用http
- iOS自定义类 - NSKeyedArchiver归档自定义类
- Linux多线程同步——信号量
- HDU-1087(Super Jumping! Jumping! Jumping!)(LCS)
- nyoj 284 坦克大战
- 四舍五入的四种方法