vb.net forms question


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Page 1 of 2 12 LastLast
Results 1 to 15 of 29

Thread: vb.net forms question

Hybrid View

  1. #1
    Join Date
    Aug 2006
    Posts
    43

    Post 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

  2. #2
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,666
    Just manually reset the caption through code.
    I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
    Please use [Code]your code goes in here[/Code] tags when posting code.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    Modifications Required For VB6 Apps To Work On Vista

  3. #3
    Join Date
    Aug 2006
    Posts
    43
    Ok i see what you are saying but i do not understand what i have to do to talk to the other form

  4. #4
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,666
    Code:
    Form2.Text = "The is now the new caption"
    I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
    Please use [Code]your code goes in here[/Code] tags when posting code.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    Modifications Required For VB6 Apps To Work On Vista

  5. #5
    Join Date
    Aug 2006
    Posts
    43
    i understand how to do it like that in form2 but i want from form 2 to update the title bar in form1

    thanks

  6. #6
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,666
    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.
    I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
    Please use [Code]your code goes in here[/Code] tags when posting code.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    Modifications Required For VB6 Apps To Work On Vista

  7. #7
    Join Date
    Aug 2006
    Posts
    43
    ok it tried that but it just gives me an error it says it dose not know what form1 is

  8. #8
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,666
    Again, that was nothing more than an example.

    What is the real name of the form that you want to change the caption of?
    I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
    Please use [Code]your code goes in here[/Code] tags when posting code.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    Modifications Required For VB6 Apps To Work On Vista

  9. #9
    Join Date
    Aug 2006
    Posts
    43
    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

  10. #10
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,666
    Ok, if MainForm is the name of the form, then that part is right.

    What is drAdmin.centerName?
    I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
    Please use [Code]your code goes in here[/Code] tags when posting code.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    Modifications Required For VB6 Apps To Work On Vista

  11. #11
    Join Date
    Aug 2006
    Posts
    43
    that is my link to the database to get the centerName

  12. #12
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,666
    So, centerName is a field in a table in your database, and that is where the caption info is coming from?
    I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
    Please use [Code]your code goes in here[/Code] tags when posting code.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    Modifications Required For VB6 Apps To Work On Vista

  13. #13
    Join Date
    Aug 2006
    Posts
    43
    yes exactly

  14. #14
    Join Date
    Aug 2006
    Posts
    43
    here is a picture of what vb is giving when i type
    Code:
    MainForm.Text = drAdmin.centerName
    Attached Images Attached Images

  15. #15
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,666
    And, don't tell me, but arAdmin is a bound data control, right?
    I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
    Please use [Code]your code goes in here[/Code] tags when posting code.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    Modifications Required For VB6 Apps To Work On Vista

Similar Threads

  1. DoubleBuffered Question VB.NET
    By howiegoo in forum .NET
    Replies: 3
    Last Post: 09-16-2007, 06:06 PM
  2. A question on VB.NET
    By scorpions in forum .NET
    Replies: 1
    Last Post: 06-20-2007, 05:45 AM
  3. Replies: 2
    Last Post: 09-10-2005, 02:56 AM
  4. VB.NET upgrade question
    By tlwahl in forum .NET
    Replies: 1
    Last Post: 06-30-2005, 07:03 AM
  5. vb.net database question
    By dc in forum .NET
    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
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center