I am creating Robot Add-in to automate some tasks. Everything went fine until I started implementing Windows Form control.
I started Form, picked some controls, and although in designer it looks nice:
after add-in installing and launching, Robot displays empty form, without controls.
Anobody got some ideas ?
I attached my sample project with IRobotAddIn implementation in CyborgExtension.cs file, some sample Robot project and simple iteration through slabs.
Thanks in advance
Solved! Go to Solution.
Solved by MarekWiecek. Go to Solution.
You just need initialize components in your overloaded constructor of UcsFixForm class.
public UcsFixForm(RobotApplication robot)
{
_robot = robot;
InitializeComponent(); <--- this was missing
}
I'm also wondering why you disable user control in Robot
robot.UserControl = false;
before you run your form.
It may lead to unexpected behavior I'm afraid.
What do you want to achieve?
Regards,
Marek Wiecek
Ah, of course! - such a silly mistake!
Now it works fine!
Looking for solution I also tested robot.UserControl - this is code remnant to remove.
Thanks so much, Marek.