05-29-2007 03:34 PM
I assume this should be trivial but I can't get it to work. I'm using the TestExec.exe and I'm trying to update the text of a label I've added to the Execution Tab from a step in my sequence. i.e. A step in my sequence reads a temperature and I'd like it to pass this info to the label on my TestExec UI. From the TestStand3.5 side, I tried using the PostUIMessage with a custom event code UIMsg_UserMessageBase+1 from my sequence. But, from the UI side, I can't seem to figure out how to connect to this control in my C# code to capture this message.
I've tried to use ConnectCaption but, obviously my custom message isn't one of the CaptionSource options..
this.axExecutionViewMgr.ConnectCaption(this.axLabel1, CaptionSource.? .....);
Also thought there might be a SetCaptionText function but there is no such thing I can find.
Anyone have any idea how to do this?
05-30-2007 07:09 AM
Figured it out....No need to do any attaching. Just simply override the axApplicationMgr_UIMessageEvent and then check to see which user message has been passed:
if (e.uiMsg.Event == NationalInstruments.TestStand.Interop.API.UIMessageCodes.UIMsg_UserMessageBase)
{
my_label.Caption = e.uiMsg.StringData;
}