C# help

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • blackevanuz
    New Member
    • Sep 2007
    • 10

    C# help

    Hi i want to rename a form that is hidden, i think it has to be focused but i dont know how
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    Do you mean a control?
    You should be able to double-click the file in the solution explorer to have it bring up the designer for that forum.

    If you can't find the control, go to the properties window, there's a dropdownlist where you can pick from all of your controls. Select the one you want?

    Comment

    • blackevanuz
      New Member
      • Sep 2007
      • 10

      #3
      sorry i didnt explain it well.
      I mean when the application is running appears the form a, then i open the form b and when i close it i want to rename the form a with a string of the form b

      Comment

      • Plater
        Recognized Expert Expert
        • Apr 2007
        • 7872

        #4
        You want to re-show form A?
        Or you want to change the title of Form A?

        Comment

        • blackevanuz
          New Member
          • Sep 2007
          • 10

          #5
          i want to rename it and show it but with a variable of the form b

          Comment

          • Plater
            Recognized Expert Expert
            • Apr 2007
            • 7872

            #6
            Well I don't think you can just "rename" a class a runtime.

            If you wanted to you could create another instance of it, but if you do, you should make sure your first instance is closed.

            Perhaps some code would help clarify your question?

            Comment

            • blackevanuz
              New Member
              • Sep 2007
              • 10

              #7
              but its not the class which i want to rename its only the title of the form

              Comment

              • Plater
                Recognized Expert Expert
                • Apr 2007
                • 7872

                #8
                So if you have a class my "mainform" and you have an instance of it "FormA":
                Code:
                mainform FormA = new mainform();
                You could then use:
                Code:
                FormA.Text = "My new title";
                FormA.Show();

                Comment

                • blackevanuz
                  New Member
                  • Sep 2007
                  • 10

                  #9
                  ok thank you very much :D

                  Comment

                  Working...