I just find that in VB I can read picture properties such as handle, height, type, etc. of ActiveX objects.
But in LabView, these properties all return zero.
You can see it in attached files. (I use Microsoft Picture Clip ActiveX object as example)
Could anyone please tell me why?
Or........ just tell me if LabView can handle picture property of ActiveX.
I really enjoy writing in G.
I hope I can do everything with labview~~
Try pulling Hwnd, Height, and Width straight off the "IPicClip". No help for hPal, or Type....
Check the attached file!
I just try to simply pass a picture from PicClip_1 to PicClip_2.
Why it doesn't work?
What should I do ?
I'm missing the PicClip object and can't pursue this now. However, if you examine the properties of the PicClip class, you should see the handle , Height, and Width (along with Picture.) They returned valid values on another machine.
Dunno what's happening with Picture! - but I've never used these tools.
We should be looking at error codes, though. Might be a type (or class) incompatibility here...
As far as I understand from the MSDN site, it seems that the Picture datatype is a specific VB only datatype. Most probably it is a handle (uInt32) value as far as other programs including LabVIEW are concerned, but there is no way that LabVIEW could deal with this datatype directly.
@sealiker wrote:I am using an ActiveX object which needs a property "picture" as input.I can set the picture property in its property page in design time, but I don't know how to give it a "picture" in run time.In VB, I can do:dim pic As Picturepic = loadpicture("c:\test.bmp")control_1.picture = pic(("control_1" is the ActiveX object, and picture is the property))How can I do the same with labview?Is there any example that sets the picture property of an ActiveX in run time?
Thanks for your replies, but I feel a little bit frustrated now~~:(
I got a error message which said that the interface is not supported when I tried to automation open a stdType.picture activeX Class.
But I am still looking forward to a solution.
I find a VC++ thing which seems try to create a picture class for ActiveX via the COleDispatchDriver class (implements the client side of OLE automation).
Maybe the OLE automation can be used in Labview, or a VC++ file can be written to be called from labview.
Do you think this a way I can try?
I don't have a computer science background and do need some help and suggestions.
由 sealiker 在 03-07-2006 05:48 AM 上編輯的訊息
I found that some ActiveXs dealing with images such as ImageX have a load method that allow one to load a picture with just a file path.
Maybe this will help you~
Unfortunately, the ActiveX I am using, like the Ms image list, doesn't have a load method.
I hope that NI can offer some support about dealing with Ole picture in labview.