vb.net - Visual Studio 2013: Cannot update textbox with event handler -
i building application using 1 of our vendors interfaces, required keep status message box updated.
i have events have handled testing using message box, come pass these messages display box nothing.
public shared sub pageairhandler(channelnum integer, index integer, channeltype claritycomlib.channeltype, pagename string) handles status1.airstatuschanged messagebox.show(pagename) controlpanel.airstatusbox.text = pagename end sub
the messagebox dutifully displays pagename string, textbox nothing... if replace pagename string variable "test"
controlpanel.airstatusbox.text = "test"
i no activity, no errors, nada. have googled around, every example can find seems show same code.
i have recreated textbox, tried buttons, labels , other objects same result. setting button click handler update of these works expected.
apologies if noob blunder, it's driving me nuts!
using dlg new form2 dlg.showdialog() end using
things like:
form2.show() form2.show(me) form2.showdialog() form2.showdialog(me)
shoul avoided possible, because vb.net creates implicit instance. problem is, instance gets killed if call has done.
there can see class instance of project not interact correctly in cases.
as hans passant said, call set textbox text targets wrong instance.
invoking user controls possible with:
me.invoke(sub() textbox1.text = "blabla" end sub)
Comments
Post a Comment