vb.net - Passing variables between windows forms in VS 2010 -
i have 2 forms. form 1 allows user pick employee dropdown combo box. employee passed onto form 2 user enters additional information regarding employee. data passed sql table.
on form 1 have:
dim changejobinfo new form2(employee) changejobinfo.show()
on form 2 have:
public sub new(byval employee string) msgbox(employee) end sub
the variable passes fine. issue nothing shows on new form. when setup form2, added combobox, date picker, 2 text boxes, submit button, etc., when form loads blank. no errors, msgbox returns right result, none of gui elements show up. if change code on form 1 form2.show() see form laid out in designer.
any ideas on how items show up?
change code in form2.vb new
sub this:
public sub new(byval employee string) ' call required designer. initializecomponent() ' add initialization after initializecomponent() call. msgbox(employee) end sub
if don't call initializecomponent()
, complete gui not going render.
Comments
Post a Comment