使用setxdata 时,xtype只能有一个1001。如果要再注册一个,需要重新给xtype赋值,然后再使用setxdata. 原程序应改为: xtype(0)=1001 xtype(1)=....... xdata(0)="NEW" xdata(1)=....... Rectangle1.SetXData xtype, xdata xtype(0)=1001 xtype(1)=....... xdata(0)="RECT" xdata(1)=....... Rectangle1.SetXData xtype, xdata |