Set Textbox value from another form (Full Version)

All Forums >> [.NET Compact Framework Development] >> .NET Compact Framework - VB.NET



Message


vwalla -> Set Textbox value from another form (5/1/2008 9:20:10 PM)

OK...I am going nuts.

I have 2 textboxes on my form.

I click a button on the form to open a new modal form with a combobox & a listview.

After selecting values on both the combo & listview on the second from, when I close the form, I want to set the values selected from the combo & listview in the textboxes on the 1st form.

I have tried a million different ways & it comes up with no values.  BTW the textboxes are read only if that matters.

Thanks




petevick -> RE: Set Textbox value from another form (5/6/2008 4:25:04 AM)

Hi,
What ways have you tried?

You can use 'public' variables, set the variables to the content of your combo and listview, and then when the modal form closes, set your text boxes to the values of the variables.

Or you can define a variable as a 'form', and set it to your first form and use that value to set the text boxes

Public myForm as form


just before calling form2 do
myForm = me

and in form2 you should be able to do

myform.textbox1.text = ....

Pete




Page: [1]



Forum Software © ASPPlayground.NET Advanced Edition 2.5.5 Unicode

0.000