472,988 Members | 2,345 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,988 software developers and data experts.

actulizar un textbox desde otro formulario

hola amigos.... tengo dos formularios en los cuales desde uno de ellos quiero
poder modificar lo que lleva dentro un textbox el otro.

agradesco su colaboracion.

Marcelo
Jun 13 '07 #1
1 8308
On Jun 13, 8:58 am, Marcelo <Marc...@discussions.microsoft.comwrote:
hola amigos.... tengo dos formularios en los cuales desde uno de ellos quiero
poder modificar lo que lleva dentro un textbox el otro.

agradesco su colaboracion.
Seria mejor hacer esta pregunta en microsoft.public.es.dotnet.vb.

Pero, tambien ofresco servicio de traducion, gratis. :-)

The post reads:

"Hello. I have two forms, and I want to change the contents of a text
box on one form from another. Thank you for your help."

Here is a solution.

Let's call your forms form1 and form2. Say that form1 conteains
textBox1, and you want to change textBox1 from form2.

First, form2 needs a reference to form1. If form2 is going to change
something on form1, then it has to be able to get to form1. How you do
this depends very much on how the two forms are created. You would
have to give more details in order for us to provide help there.

Second, form1 should define a property that allows outsiders to modify
the contents of the text box. It is best to name the property after
what the information in the text box is, not after the text box
itself. Something like this:

public string NombreDeCliente
{
get { return this._textBox1.Text; }
set
{
if (value == null)
{
this._textBox1.Text = "";
}
else
{
this._textBox1.Text = value;
}
}
}

Then, from form2, you can do this:

form1.NombreDeCliente = "John Smith";

Jun 13 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Gema | last post by:
Hola a todos, tengo un formulario en el que solicito el nombre de una base de datos que luego quiero crear en SQL Server. Lo hago a traves del siguiente código: Private Sub btnCrear_Click(ByVal...
0
by: news.arsys.es | last post by:
Hola a todos. Me gustaria lanzar desde una macro comandos del tipo del asunto si es que se puede... Es para usarlo con las Autokeys.. Saludos a todos...
2
by: Jorge Gallardo | last post by:
Hola a todos. Me gustaria saber si se puede utilizar lo del asunto desde una accion de macro... Si no es asi, como podria convertirlo a modulo para llamarlo desde la macro. Necesito que el...
0
by: Jonas L | last post by:
Hi, I need to create a textbox which acts as a normal textbox but with the following extra requirements: 1) In-focus color, when the textbox gets focus the backcolor property of the textbox...
11
by: Liber | last post by:
¿Alguien podría explicarme como enviar mails desde un WindowsForm ?, puedo hacerlo con un WebForm, pero no se como hacerlo con WindowsForm, podrían darme un ejemplo. Gracias, Saludos, Liber.
4
by: GZG | last post by:
Por ejemplo Dim FRM As String = "fUno" 'y poder yo decir lo siguiente FRM.Show 'se asume que hay un formulario con el nombre fUno en mi proyecto 'mi necesidad es crear un objecto...
1
by: Neolo | last post by:
Hola, necesito ayuda. Tengo un formulario en access 2003 y necesito hacer que al elegir en un combo la provincia me salga la lista de los municipios de esa provincia, los cuales tengo...
0
by: Jacob Donajkowski | last post by:
Once the user logs in I want to have the users switch from the Roster View to the Profile View and enter their profile infomation and save it. Then the next time they login and go to the Profile...
4
by: =?Utf-8?B?S3VsYmVy?= | last post by:
First off, excuse my English, is an online translation. Hello. I've been looking for a long time over the Internet how to make a "textbox" is transparent or having a background image, but I can...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.