CnPack Forum


 
listary
新警察
Rank: 1



UID 42071
Digest Posts 0
Credits 25
Posts 9
点点分 25
Reading Access 10
Registered 2009-3-26
Status Offline
Post at 2019-1-3 15:48  Profile | Blog | P.M. 
已解决

有个问题困扰很久了,请各位老师帮助。在弄一个项目,要把图像显示到界面上,要把VB的代码转为Delphi的项目,VB或CSharp的代码是这样
C#:
//Dll 函数声明:
[DllImport("iClientApi.dll", EntryPoint = "iClientSetWindow")]
public static extern bool  iClientSetWindow(IntPtr pIClient, IntPtr hWnd);
iClientLib.iClientSetWindow( pIClient, pictureBox1.Handle );  //这个用了一个Picture控件来显示图片 可以显示
VB6:
'Dll 函数声明:
Declare Function iClientSetWindow Lib "iClientApi.dll" (ByVal pIClient As Long, ByVal hWnd As Long) As Boolean
iClientSetWindow pIClient, Display.hWnd     '这个用了一个Frame控件来显示图片
我转成Delphi7来显示图片总是不成功
//Dll函数声明:
Function iClientSetWindow(pIClient:Cardinal; hWnd:THandle):Boolean; stdcall; external 'iClientApi.dll';
tmpBool := iClientSetWindow(pIClient, img1.Canvas.Handle);   //这里用了一个Image控件,显示不出来

请老师帮忙!

[ 本帖最后由 listary 于 2019-1-3 15:57 编辑 ]
Top
 




All times are GMT++8, the time now is 2024-12-9 12:51

    本论坛支付平台由支付宝提供
携手打造安全诚信的交易社区 Powered by Discuz! 5.0.0  © 2001-2006 Comsenz Inc.
Processed in 0.009182 second(s), 7 queries , Gzip enabled

Clear Cookies - Contact Us - CnPack Website - Archiver - WAP