silverspecv
Programmer
Ok, I have a form that has 3 strings, 3 buttons, and a user control. The buttons each instiantiate a new instance of the user control. The user control has a text box and an ok button. The idea is that the user types text in the box, clicks Ok, and the user control passes the text back to the form, and the form stuffs the data into the appropriate string variable. I did figure out how to raise an event from the user control and pass the text as an argument and the capture the text in the form's event handler. But what I can't figure out is how to feed a handle to the string into the user control during instantiation, and receive that handle back out in the event so that I can stuff the text into one of the 3 string values. I can't tell exactly what it's doing, but it looks like the text comes back and sets into local variables or something and the data never goes into the "global" string. Byval? Byref? I have no idea what I'm doing wrong. I general how would one accomplish this?