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 API快速搜索ListBox中的字符串。提供了具体的代码示例和必要的步骤说明。
299

被折叠的 条评论
为什么被折叠?



