Skip to main content

Set Textbox value from another form

 
Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [.NET Compact Framework Development] >> .NET Compact Framework - VB.NET >> Set Textbox value from another form Page: [1]
Login
Message << Older Topic   Newer Topic >>
Set Textbox value from another form - 5/1/2008 9:20:10 PM   
vwalla

 

Posts: 1
Score: 0
Joined: 5/1/2008
Status: offline
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
Post #: 1
RE: Set Textbox value from another form - 5/6/2008 4:25:04 AM   
petevick


Posts: 3320
Score: 0
Joined: 4/26/2002
From: Bolton - UK
Status: offline
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

_____________________________

Pete Vickers - Microsoft MVP - Device Application Development
www.gui-innovations.com

Please do not email me with questions. Posting your questions in the forums will get a quicker response - Thanks.

(in reply to vwalla)
Post #: 2
Page:   [1]
All Forums >> [.NET Compact Framework Development] >> .NET Compact Framework - VB.NET >> Set Textbox value from another form Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Forum Software © ASPPlayground.NET Advanced Edition 2.5.5 Unicode

0.016