.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> Windows Application >> Post New QuestionBookmark and Share Subscribe to Forum

carry value from one form to another form

Posted By: Madhu Gowda     Posted Date: March 21, 2011    Points:5   Category :Windows Application
Hi...
i have two forms form1 and form2
i wann carry form1 textbox string to form2 textbox without using static key
thnx in advance


Responses
Author: Sunil Yadav       [Moderator]      
Posted Date: March 21, 2011     Points: 20   

Hi,

Checkout the link below.

http://msdn.microsoft.com/en-us/library/aa288422(v=vs.71).aspx

Hope this helps.

Author: Aamrapali Tamgadge             
Posted Date: March 22, 2011     Points: 20   

first take one string s1 in your form2,den make an object of form 2 in form 1 like
form2 f2=new form2();
f2.s1=textbox1.Text;

//then directly in your string s1 the textbox1 value wil come den show it on your form2 textbox

Software Programmer At OTIS ISRC
Author: Karthikeyan Anbarasan       [Moderator]      
Posted Date: March 23, 2011     Points: 20   

Try using Modules... With this you can easily pass values between forms in win app

Thanks
Karthik
http://www.f5debug.net
Mark as Answer if the answer solves your issue!!!
Author: Maverick             
Posted Date: March 29, 2011     Points: 20   

Hello,

You can use constructor for this purpose

on form2 declare

public form2(string x)
{
}

form form1
dim objform2 as new form2
objform2.show(textbox.text)

Thanks,
Maverick


Thanks,
Maverick


Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend