Re: Is it possible to access a control in another form?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Doru,

You would have to have a reference to the form. If you have a
reference, then you have to expose a method/property/field which will expose
the TextBox publically. Once you do that, you can just call the
method/property/field and then do what you need to do with it.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- mvp@xxxxxxxxxxxxxxxxxxxxxxxxxxx

"Doru Roman" <doruroman@xxxxxxxxxx> wrote in message
news:%23tRe9cDKGHA.516@xxxxxxxxxxxxxxxxxxxxxxx
Hi,

In a MDI environment I am in one form (main or child). How can access a
value from a text box placed in another form? An example please.
Thanks,
Doru



.



Relevant Pages

  • Re: Articles or Turorials on Aggregation??
    ... >> enclosingtype only expose value types from the composed type, ... >> soon as you expose it as reference you lose the composition as the ... public property the calling code can keep a reference after the wrapper ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Autonumber Fields
    ... if by "expose it" (in reference to an artificial key) you mean show it ... > ON UPDATE CASCADE; ...
    (microsoft.public.access.tablesdbdesign)
  • Re: .Net COM+
    ... write your own IUnknown to expose a programmatic interface to ... management leaves a lot to be desired (Reference counts isn't perfect, ... transaction features can be used .. ...
    (microsoft.public.dotnet.distributed_apps)
  • Re: Unable to reference a web service on a windows project
    ... making sure that you expose the ... In the project that you are referencing, add a web reference, point ... it to the correct url and then select the hyperlink for the webservice. ... no code is generated for my web service. ...
    (microsoft.public.dotnet.distributed_apps)
  • Re: Articles or Turorials on Aggregation??
    ... > Only if you expose the list as an indexer, if you just expose it as a ... >> immutable reference types (eg string) too though. ... > composition) but you can keep a reference to it after the wrapper is ...
    (microsoft.public.dotnet.languages.csharp)