opelosi

Convertion of a Symbol to PBControl

Discussion created by opelosi on Mar 19, 2013
Latest reply on Mar 21, 2013 by dhollebeek

Hi,

 

 

 

I'm getting an error when trying to convert a PBObjLib.Symbol to PBSymLib.PBControl in C#.

 

The error says that the two types cannot be converted. Somebody knows what i'm missing?

 

 

 

The Code  Example:

 
m_display.Symbols.Add(PBObjLib.pbSYMBOLTYPE.pbSymbolControl, "myActiveXClass");

foreach (Symbol s in m_display.Symbols)
      if (s.Type == (int) PBObjLib.pbSYMBOLTYPE.pbSymbolControl) 
      {
             myActiveXClassLib.myActiveXClass _axclass = (myActiveXClassLib.myActiveXClass) ((PBControl)s).Object;
             MessageBox.Show(_axclass.Created.ToString());
      }

 

 

Thanks in Advance.

Outcomes