vb.net forms question
Hi i have a mdi form that i want to refresh from the child form is there any way of doing that? the reason i need to do that is it is connected to a database so when they update the name of the company it updates it in the title bar in the mainform which is the mdi container.
Trains
Just manually reset the caption through code.
Ok i see what you are saying but i do not understand what i have to do to talk to the other form
Code:
Form2.Text = "The is now the new caption"
i understand how to do it like that in form2 but i want from form 2 to update the title bar in form1
thanks
Just use the form name. I used form2 as an example. If you want to update the caption in form1, then use form1.text instead.
ok it tried that but it just gives me an error it says it dose not know what form1 is
Again, that was nothing more than an example.
What is the real name of the form that you want to change the caption of?
it is mainform and i have been changing form1 to mainform in my code
this is what i was trying to use
Code:
MainForm.Text = drAdmin.centerName
Ok, if MainForm is the name of the form, then that part is right.
What is drAdmin.centerName?
that is my link to the database to get the centerName
So, centerName is a field in a table in your database, and that is where the caption info is coming from?
And, don't tell me, but arAdmin is a bound data control, right?
here is a picture of what vb is giving when i type
Code:
MainForm.Text = drAdmin.centerName
Attached Images
Similar Threads
By howiegoo in forum .NET
Replies: 3
Last Post: 09-16-2007, 06:06 PM
By scorpions in forum .NET
Replies: 1
Last Post: 06-20-2007, 05:45 AM
Replies: 2
Last Post: 09-10-2005, 02:56 AM
Replies: 1
Last Post: 06-30-2005, 07:03 AM
Replies: 4
Last Post: 04-22-2002, 12:45 PM
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center