Newbie: Passing variable values

  • Thread starter Thread starter Adriano
  • Start date Start date
A

Adriano

hello,

i have parent MDI and child inside, parent MDI has a string variable var1 =
"somestring", how can pass that value to, say, textbox of the child form?

Regards,

Adriano
 
Adrianno,

You can forever pass a value from a mdi.parent to its childs just using
myMdiChildForm.itsTextbox.text = "Wathever"

(assuming you instanced it directly with dim myMDiChildForm as new
mychildform)

I hope this helps?

Cor
 
hello Cor,
thanks for reply,

what if I pass VARIABLE instead of textbox.text value from parent to child
MDI, how would the code look like?

thanks in advance,
Adriano
 
Adriano,

Exactly the same

However you would have to make that variable public or friend in your
midiform. Or really nice a property but that is in my opinion not really
needed here.

Cor
 
thanks again for your reply,
i have the last question :)

what would the code look like if I call the variable declared in parent MDI
from child MDI? for example I have a TextBox1 in child form and have alredy
declared var1 = "somestring" string variable in my parent MDI, so
TextBox1.text = ???

many thanks in advance,
Adriano
 
Adriano,

Hopefully not as you write it, however

public var1 as String

and than is the answer var1

Cor

"Adriano"
thanks again for your reply,
 
Back
Top