Welcome to Synthiam!

The easiest way to program the most powerful robots. Use technologies by leading industry experts. ARC is a free-to-use robot programming software that makes servo automation, computer vision, autonomous navigation, and artificial intelligence easy.

Get Started
Asked — Edited

Controls In A New Form?

Hi DJ!
After a couple of hours programming in Visual C# I was wondering if it was possible to send commands (for example set servoposition) from another form than the main form containing the ezb-connect.

Hope you understand what I'm trying to do:P
Have the main form display the connect to ezb, and a button to open a new form where there are buttons to control servos.

Thank you :-)
- Mix3rn


Upgrade to ARC Pro

Unleash your creativity with the power of easy robot programming using Synthiam ARC Pro

All of my programming experience is from VB6, so I can't tell you how to do it in c# yet (I plan on getting a book or taking a class) but I can affirm what you want to do is certainly possible. In vb6, you woukd add the control to one form (lets say form1) and if you wanted to use it from another form, you would use form1 as the first part of the control name.


Rc = form1.control1.method(parameter1,parapmeter2,etc)
If rc = 0 "success"
Else "failure"

Hey there!

Add the EZ-B Connect control. Look through the property panel for the control and set it to PUBLIC.

From another form, you can now reference that form's public objects (ez-b connect being one of them)

You may have to pass an instance of the form (this) to the other form.:)
Didn't fully understand that, sorry *confused*

User-inserted image

Do you have a code example to my project`?

Thank you very much!
I'll make one and put it in the sdk package. i'll reply to this thread when it's up. i can do it tomorrow day
Check out Tutorial 22 in the latest SDK (v2011.10.03.00)