Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / July 2007

Tip: Looking for answers? Try searching our database.

WinForm - Passing Variables Between Forms

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
OldButStillLearning - 06 Jul 2007 19:14 GMT
How do you pass varibles between screens?  I created properties in form 2 for
the variables that I wanted to pass from Form 1.  So when I create a new
instance of Form2 from Form 1, intellisense does not show me those properties
in form2 that I want to access.  So how do you pass variable values?

           frmComboEdit form2 = new Form1();
           form2.Show();

Thanks in advance for your assistance!!!
Alvin Bruney [MVP] - 06 Jul 2007 19:39 GMT
Try a static class, static object, database, text file yada yada

Signature

Regards,
Alvin Bruney
------------------------------------------------------
Shameless author plug
Excel Services for .NET is coming...
https://www.microsoft.com/MSPress/books/10933.aspx
OWC Black Book www.lulu.com/owc
Professional VSTO 2005 - Wrox/Wiley

> How do you pass varibles between screens?  I created properties in form 2
> for
[quoted text clipped - 7 lines]
>
> Thanks in advance for your assistance!!!
Alberto Poblacion - 06 Jul 2007 19:39 GMT
> How do you pass varibles between screens?  I created properties in form 2
> for
[quoted text clipped - 5 lines]
>            frmComboEdit form2 = new Form2();
>            form2.Show();

   If you created properties in Form2 and marked them as public, they
should appear in intellisense hanging from form2. Note the lowercase
"form2", NOT the uppercase "Form2" according to the preceding example. That
is, you want to use the instance of the form and not the class of the form
(unless you created static properties).

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.