PDA

Click to See Complete Forum and Search --> : change property in one control, changes value in all other instances...


cargobay69
Nov 21st, 2002, 03:42 PM
ok, i made this cool little active x control that is used to monitor the computers on our company's network by giving a visual representation of its status (connection speed, ip address, and other stuff). Two properties of the control are "ComputerName" and "Domain". Whenever I adjust either of these properties (either during runtime or designtime) the values for all other instances of the control also change to the new value. I don't know if the problem is related to a coding error, if its associated to the nature on the control and exactly what it is doing, or if it has something to do with active x controls in general.
If this is somthing that anyone has ever heard of happenning, any ideas of how to correct this are greatly appreciated,

Thanks

Rick Bull
Nov 21st, 2002, 05:07 PM
Can we see the code for that part of your ActiveX (if it's not too big)?

cargobay69
Nov 22nd, 2002, 09:04 AM
AHA! Actually I just figured it out for myself. If anyone is interested, this is what happened:
The values for the two properties in question, along with a couple other properties, were being stored in global (Public) variables that were declared in a seperate module (not the control's module). I removed their declarations from this location the re-declared them on the control's module as private. I couple other minor modifications were necessary throughout the project to accomodate this change, but after that, it worked fine with no problems (YAY!)