PictSwitch[0].Monitor problem

PictSwitch[0].Monitor problem

Hello
I have trouble when using
if (System.Windows.Forms.Cursor.Position.X >1920)
{
//position monitor 2
myFunctions.Item("Open_Trend_P2").set_DynProperties("PictSwitch[0].Monitor", 1);
}
else
{
//position monitor 1
myFunctions.Item("Open_Trend_P2").set_DynProperties("PictSwitch[0].Monitor",0);
}
myFunctions.Item("Open_Trend_P2").Start();
//restore position relative to caller
myFunctions.Item("Open_Trend_P2").set_DynProperties("PictSwitch[0].Monitor", -2);
}
After this VSTA function. My standart function Open_Trend_P2 is opening always in Monitor 1.
I don't undestand why myFunctions.Item("Open_Trend_P2").set_DynProperties("PictSwitch[0].Monitor", -2) not work?
Thanks for answer

This is a migrated post! Originally posted on 08.06.2011 by user softart2. Please be aware that information can be outdated.