PC Review


Reply
Thread Tools Rate Thread

Cross form variables !!....

 
 
John Medany
Guest
Posts: n/a
 
      16th Mar 2005
OK - After my DB nightmares this should be straight forward but i cant work
it out ...

How do I get a variable (in this case the value of a text box from one form
into another ???

Help

John


 
Reply With Quote
 
 
 
 
Chris Tacke, eMVP
Guest
Posts: n/a
 
      16th Mar 2005
Either pass it or nake the variable publicly scoped so you can reference it
directly.

--
Chris Tacke
Co-founder
OpenNETCF.org
Has OpenNETCF helped you? Consider donating to support us!
http://www.opennetcf.org/donate


"John Medany" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> OK - After my DB nightmares this should be straight forward but i cant
> work
> it out ...
>
> How do I get a variable (in this case the value of a text box from one
> form
> into another ???
>
> Help
>
> John
>
>



 
Reply With Quote
 
Daniel Moth
Guest
Posts: n/a
 
      16th Mar 2005
Stick a public property on the form that returns the value of the textbox.

What language are you using? In VB a worst alternative is to directly access
the textbox (since by default it is declared with Friend) e.g.
instanceOfForm.TextBox1.Text

Cheers
Daniel
--
http://www.danielmoth.com/Blog/


"John Medany" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> OK - After my DB nightmares this should be straight forward but i cant
> work
> it out ...
>
> How do I get a variable (in this case the value of a text box from one
> form
> into another ???
>
> Help
>
> John
>
>


 
Reply With Quote
 
John Medany
Guest
Posts: n/a
 
      16th Mar 2005
Thanks Daniel

I'm using C#

New to this obviously and trying to get up to speed
Can some one give me code exmple of a straight way of getting a string
available in form.

john


"Daniel Moth" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Stick a public property on the form that returns the value of the textbox.
>
> What language are you using? In VB a worst alternative is to directly

access
> the textbox (since by default it is declared with Friend) e.g.
> instanceOfForm.TextBox1.Text
>
> Cheers
> Daniel
> --
> http://www.danielmoth.com/Blog/
>
>
> "John Medany" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > OK - After my DB nightmares this should be straight forward but i cant
> > work
> > it out ...
> >
> > How do I get a variable (in this case the value of a text box from one
> > form
> > into another ???
> >
> > Help
> >
> > John
> >
> >

>



 
Reply With Quote
 
John Medany
Guest
Posts: n/a
 
      16th Mar 2005
Can you give me a code example in C# thanks

John

"Chris Tacke, eMVP" <(E-Mail Removed)> wrote in message
news:O33#(E-Mail Removed)...
> Either pass it or nake the variable publicly scoped so you can reference

it
> directly.
>
> --
> Chris Tacke
> Co-founder
> OpenNETCF.org
> Has OpenNETCF helped you? Consider donating to support us!
> http://www.opennetcf.org/donate
>
>
> "John Medany" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > OK - After my DB nightmares this should be straight forward but i cant
> > work
> > it out ...
> >
> > How do I get a variable (in this case the value of a text box from one
> > form
> > into another ???
> >
> > Help
> >
> > John
> >
> >

>
>



 
Reply With Quote
 
Daniel Moth
Guest
Posts: n/a
 
      16th Mar 2005
So you don't know what a property is? Here is sample (air)code:

public string SomeText{
get{
return textBox1.Text;
}
}

Cheers
Daniel
--
http://www.danielmoth.com/Blog/


"John Medany" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Thanks Daniel
>
> I'm using C#
>
> New to this obviously and trying to get up to speed
> Can some one give me code exmple of a straight way of getting a string
> available in form.
>
> john
>
>
> "Daniel Moth" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> Stick a public property on the form that returns the value of the
>> textbox.
>>
>> What language are you using? In VB a worst alternative is to directly

> access
>> the textbox (since by default it is declared with Friend) e.g.
>> instanceOfForm.TextBox1.Text
>>
>> Cheers
>> Daniel
>> --
>> http://www.danielmoth.com/Blog/
>>
>>
>> "John Medany" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>> > OK - After my DB nightmares this should be straight forward but i cant
>> > work
>> > it out ...
>> >
>> > How do I get a variable (in this case the value of a text box from one
>> > form
>> > into another ???
>> >
>> > Help
>> >
>> > John
>> >
>> >

>>

>
>


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Automating Calculation of Lagged Cross Correlations between Variables hbulsara@gmail.com Microsoft Excel Programming 1 3rd Sep 2007 11:51 PM
Passing variables to a cross tab query =?Utf-8?B?S2llcmFuIEhhbnJhaGFu?= Microsoft Access Queries 1 3rd Apr 2007 11:32 AM
Session Variables getting cross threaded Randy Microsoft ASP .NET 9 5th Oct 2005 08:11 PM
IIS Session variables / cross-access from PHP <-> ASP.NET Marco Ippolito Microsoft ASP .NET 2 5th Oct 2004 05:37 PM
Pivot Tables: Avoiding Cross-tabs (Nesting) in Row Variables Jim Microsoft Excel Misc 2 3rd Apr 2004 04:24 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:55 PM.