here is a scenario:
i have a form named frm1 and a variable in it
private x as integer = 0
and another form called frm2 that needs to be able to make a local copy of "x" from frm1 and any changes made to "x" on frm2 needs to be changed on frm1.
so in frm2 i do
private number as integer Public Sub New(ByRef x as integer) number = x end sub
and from frm1 i create frm2 as follows:
public sub createfrm() dim frm as new frm2(x) frm.showdialogue() end sub
and now any changes made to 'number' inside frm2 should change 'x' in frm1 shouldnt it? this does work if you're using a textbox object since the project im working in does exactly that. but when i try and do it for a variable like single/string/integer it doesnt work. it changes the local variable on frm2 but not the variable on frm1.