473,396 Members | 1,838 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 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 8394
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.