I may need a software function of 'Right click and create new device on front panel'.
Just after right click the menu pop up, then select 'create new device', then new device appear, by moving the mouse, can put the device wherever you want.
May I know how to implement this, thanks.
That image tells nothing. You can use a menu item, combo box, ring. etc. to list items that you can select from. What do you want to use? Do you not understand how to programatically populate it?
Do you mean that you wish the user to be able to draw new controls onto the front panel, in much the same way that you would draw a rectangle in a drawing package like paint? What would the control be used for?
Ravens Fan, your link seems to be broken.. did you mean this?
Yes, Ian. That's the one. I don't know how I got that link messed up. Maybe I didn't clear out the box completely when I pasted in the link data.
If you want to make a conrol on the FP in runtime, you can do that by using a vi, then using SETLayeredAttributes WindowsAPI (just in case you want to remove that FP layer to make a free-hanging control, then you can use GetWindowLong and SetParent Windows API to make that control VI the child of your FP. In case you want to move this control, you can use the SendMessage() API to move it on an event (Say double click of mouse control). In case you want to resize the control in runtime, you can do that too.
Is this what you were looking for?
Also check the attached VIs and link for the SETLayeredAttributes API, they might help.
http://decibel.ni.com/content/docs/DOC-15177 - Will explain SetLayeredAttributes function