在C#代码中需要帮助...... [英] Need help in a C# code...

查看:72
本文介绍了在C#代码中需要帮助......的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以解释一下:



Can anybody explain me:

int Form1.SendMessage(int hwnd, int wMsg,int wParam, object IParam)





它用于将图像复制到剪贴板。



示例:



It is used to copy image to clipboard.

EXAMPLE:

SendMessage(hHwnd, WM_CAP_EDIT_COPY, 0, 0);







这是什么那些参数(hwnd,wMsg,wParam,IParam)意味着??




Here what are those parameters(hwnd,wMsg,wParam,IParam) mean??

推荐答案

SendMessage不是普通.NET的一部分 - 它是您访问的Windows功能来自外部本机DLL。

查看关于 SendMessage [ ^ ]它会告诉您参数的含义 - 或者至少是它们的松散概述。您在 wMsg 参数中传递的值将影响 wParam 中的值的含义,以及<$ c中的值$ c> wParam (由 wMsg 参数修改)将影响 IParam 参数应该是什么以及它做什么。所以它并不像这就是它的作用或这就是它的含义那么简单。



但你为什么要用它?是不是有一个很好的理由说明为什么你不只是说

SendMessage is not a part of "normal" .NET - it's a Windows function that you access from an external native DLL.
Look at the MSDN article on SendMessage[^] and it tells you what the parameters mean - or at least the loose overview of them. The values you pass in the wMsg parameter will affect what the values in wParam mean, and the values in wParam (as modified by the wMsg parameter) will affect what the IParam parameter should be and what it does. So it's not as simple as "this is what it does" or "this is what it means".

But why are you using that? Is there some good reason why you aren't just saying
Image im = Image.FromFile(@"D:\Temp\MyPic.jpg");
Clipboard.SetDataObject(im);


参考这两个链接



MessageWindow.SendMessage方法 [ ^ ]



MessageWindow成员 [ ^ ]



问候......:笑:
Refer these two links

MessageWindow.SendMessage Method[^]

MessageWindow Members[^]

Regards..:laugh:


这篇关于在C#代码中需要帮助......的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆