Congratulations DJ Sures, for answering the question and has received an EZ-Credit award! Share what you have learned and create a tutorial to help others by clicking here.

Listen To Eventhandler In C++ Without Gui

Assistance Requested

Help larschrjensen with their question and receive $10 of EZ-Credit to get more robots and parts from our store. The following information was provided about their previous efforts searching tutorials for a resolution.

larschrjensen claims to have checked these sources:

I'm attempting write a small c++ cli program with which I can connect to and control each servo. However, I am running in to the problem of making the connection without using a gui.
Does anyone have an idea of how I can listen to the eventhandler without using the gui?

What I have so far is this:


#include "stdafx.h"
using namespace std;
using namespace EZ_B;
using namespace System;

int main(){
EZ_B::UCEZB_Connect^ ezB_Connect1;
ezB_Connect1 = (gcnew EZ_B::UCEZB_Connect());
ezB_Connect1->Name = L"ezB_Connect1";
ezB_Connect1->Port = L"";
ezB_Connect1->TCPPassword = nullptr;

Any help will be highly appreciated Smile

Best regards,

I have found a few conversations, tutorials and activities that may help with your question. Take a look at these links. I've sorted them by what I believe to be most relevant but that is not always the case as I'm still learning.

Also, consider reviewing the Learn section for informative lessons and activities. Check it out!


Do not use UCEZB_Connect because it is a graphical user control (hence the UC in the naming convention).

Use EZ_B::EZB instead...

EZ_B::EZB will provide a Connect() method which you can call directly


EZ_B::EZB ^ezb;
ezb = gcnew EZ_B::EZB("MyEZB");

for (int x = 0; x < 10; x++) {

ezb->Servo->SetServoPosition(EZ_B::Servo::ServoPortEnum::D0, 40);

ezb->Servo->SetServoPosition(EZ_B::Servo::ServoPortEnum::D0, 120);


Thanks a million!