Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. In windows application from1 Link to form2 i want buttons visible false how? [modified]

In windows application from1 Link to form2 i want buttons visible false how? [modified]

Scheduled Pinned Locked Moved C#
questionhelp
6 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    pramod2517
    wrote on last edited by
    #1

    hi all My Problem is In form1 i have submit button and when i click submit button its open form2 . In form2 i want hide three textboxes , how can i hide three text boxes .but here another problem when i want open form2 i want to three textboxes should be visible , its how ? Its form 1 link to form2 In form1 button1click button_click (or) some control { this.visible=false; form2 f2=new form2(); f2.showdialog(); form2.btnclick.visible=false;//this is myproblem cont hide btnclck in form2 this.close(); } In form2 I cont seting property visile =false any Button. when i particuar form2 open it should visible button true pls send me code and ur sugestions . thanks so much.

    modified on Sunday, March 22, 2009 3:07 PM

    D D N 3 Replies Last reply
    0
    • P pramod2517

      hi all My Problem is In form1 i have submit button and when i click submit button its open form2 . In form2 i want hide three textboxes , how can i hide three text boxes .but here another problem when i want open form2 i want to three textboxes should be visible , its how ? Its form 1 link to form2 In form1 button1click button_click (or) some control { this.visible=false; form2 f2=new form2(); f2.showdialog(); form2.btnclick.visible=false;//this is myproblem cont hide btnclck in form2 this.close(); } In form2 I cont seting property visile =false any Button. when i particuar form2 open it should visible button true pls send me code and ur sugestions . thanks so much.

      modified on Sunday, March 22, 2009 3:07 PM

      D Offline
      D Offline
      dan sh
      wrote on last edited by
      #2

      pramod2517 wrote:

      In form2 i want hide three textboxes

      pramod2517 wrote:

      form2 i want to three textboxes should be visible

      You want to hide and show the textboxes? Do you think it is possible to show and hide something at same time?

      pramod2517 wrote:

      pls send me code.

      No.

      pramod2517 wrote:

      sugestions

      1. Rephrase your question. Clearer this time. 2. Try something yourself. 3. Use google.

      जय हिंद

      1 Reply Last reply
      0
      • P pramod2517

        hi all My Problem is In form1 i have submit button and when i click submit button its open form2 . In form2 i want hide three textboxes , how can i hide three text boxes .but here another problem when i want open form2 i want to three textboxes should be visible , its how ? Its form 1 link to form2 In form1 button1click button_click (or) some control { this.visible=false; form2 f2=new form2(); f2.showdialog(); form2.btnclick.visible=false;//this is myproblem cont hide btnclck in form2 this.close(); } In form2 I cont seting property visile =false any Button. when i particuar form2 open it should visible button true pls send me code and ur sugestions . thanks so much.

        modified on Sunday, March 22, 2009 3:07 PM

        D Offline
        D Offline
        DaveyM69
        wrote on last edited by
        #3

        Do you mean that if the form is shown via the Submit Button then the TextBoxes should be hidden, otherwise they should be shown? If so, add a method to Form2, maybe

        public void HideTextBoxes()
        {
        textBox1.Visible = false;
        // etc...
        }

        and call that method after instanciation but before Show() in your submit button's handler.

        Dave
        BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
        Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)

        P 1 Reply Last reply
        0
        • D DaveyM69

          Do you mean that if the form is shown via the Submit Button then the TextBoxes should be hidden, otherwise they should be shown? If so, add a method to Form2, maybe

          public void HideTextBoxes()
          {
          textBox1.Visible = false;
          // etc...
          }

          and call that method after instanciation but before Show() in your submit button's handler.

          Dave
          BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
          Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)

          P Offline
          P Offline
          pramod2517
          wrote on last edited by
          #4

          form2 i added this code public void HideTextBoxes() { textBox1.Visible = false; } this function can i call in form1 my problem is when i form1 to form2 i want hide form2 buttons or textboxes . if separate i open form2 textboxes or buttons should visible i code apply in form1 in submitbutton form2.textbox1.visible=false; but here when i click form1 to form2 , in form2 textbox1 visible .

          C 1 Reply Last reply
          0
          • P pramod2517

            form2 i added this code public void HideTextBoxes() { textBox1.Visible = false; } this function can i call in form1 my problem is when i form1 to form2 i want hide form2 buttons or textboxes . if separate i open form2 textboxes or buttons should visible i code apply in form1 in submitbutton form2.textbox1.visible=false; but here when i click form1 to form2 , in form2 textbox1 visible .

            C Offline
            C Offline
            Christian Graus
            wrote on last edited by
            #5

            Use delegates to create communication between forms, then an event in one form, can cause a method to be called in another.

            Christian Graus Driven to the arms of OSX by Vista.

            1 Reply Last reply
            0
            • P pramod2517

              hi all My Problem is In form1 i have submit button and when i click submit button its open form2 . In form2 i want hide three textboxes , how can i hide three text boxes .but here another problem when i want open form2 i want to three textboxes should be visible , its how ? Its form 1 link to form2 In form1 button1click button_click (or) some control { this.visible=false; form2 f2=new form2(); f2.showdialog(); form2.btnclick.visible=false;//this is myproblem cont hide btnclck in form2 this.close(); } In form2 I cont seting property visile =false any Button. when i particuar form2 open it should visible button true pls send me code and ur sugestions . thanks so much.

              modified on Sunday, March 22, 2009 3:07 PM

              N Offline
              N Offline
              Nouman Bhatti
              wrote on last edited by
              #6

              Multiply ways to do this... -in form2 declare a variable and decide on it's value set it's value through constructor -declare properties and user them

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups