It's not secret that .NET or ActiveX object on front panel appears to be child window of NI container clipping window, which itself is a child of front panel window. When there's only one object in the container on FP, it is easy to get its window handle (HWND) by calling GetTopWindow or simply by iterating through all child windows of FP. This handle has to-one correspondence with automation refnum on block diagram. But when there are several .NET/ActiveX objects on the panel, it's impossible to identify their handles with refnums on BD.
The way of handle obtainment could be implemented by any of the following methods:
1.
2.
(or let it be private property, being activated with special *.ini key)
3.
MgErr AutoRefNumToHWND(refNum, hwndp); - this variant is analogue of LabVIEW Manager function FRefNumToFD, where refNum is automation refnum of .NET/ActiveX object (type LVRefNum) and hwndp is pointer to child window handle (type HWND *).
Probably many people may consider this idea unimportant, but when it comes to drawing different shapes, displaying text, copying window content etc., my suggestion may be very relevant.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Any idea that has received less than 3 kudos within 3 years after posting will be automatically declined.