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
  1. Home
  2. General Programming
  3. C#
  4. Creating windows application using C#

Creating windows application using C#

Scheduled Pinned Locked Moved C#
questioncsharpwinformshelp
8 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.
  • F Offline
    F Offline
    frossie
    wrote on last edited by
    #1

    Hi everyone Can anyone help me out with this... In a windows application, i have got 2 windows forms. And i wan to link the forms together with a link label in the first form. How do i go about writing the codes? Thanks in advance :)

    frossie

    E B 2 Replies Last reply
    0
    • F frossie

      Hi everyone Can anyone help me out with this... In a windows application, i have got 2 windows forms. And i wan to link the forms together with a link label in the first form. How do i go about writing the codes? Thanks in advance :)

      frossie

      E Offline
      E Offline
      ednrgc
      wrote on last edited by
      #2

      frossie wrote:

      ink the forms together with a link label

      Please explain this in detail.

      F 1 Reply Last reply
      0
      • E ednrgc

        frossie wrote:

        ink the forms together with a link label

        Please explain this in detail.

        F Offline
        F Offline
        frossie
        wrote on last edited by
        #3

        i created 2 forms in a project. 2 forms namely, form1 and form2. form1 uses a linklabel control (System.Windows.Forms.LinkLabel) to open up form 2. So when i click on this text "open form 2" which is the link label, it should open up the windows form2. SOrry but i don't really know how to explain in much detail, hope the above helps abit...thanks!

        frossie

        E R 2 Replies Last reply
        0
        • F frossie

          Hi everyone Can anyone help me out with this... In a windows application, i have got 2 windows forms. And i wan to link the forms together with a link label in the first form. How do i go about writing the codes? Thanks in advance :)

          frossie

          B Offline
          B Offline
          bobsugar222
          wrote on last edited by
          #4

          private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
          {
          Form2 form2 = new Form2();

          form2.Show();
          //or
          form2.ShowDialog();
          

          }

          F 1 Reply Last reply
          0
          • F frossie

            i created 2 forms in a project. 2 forms namely, form1 and form2. form1 uses a linklabel control (System.Windows.Forms.LinkLabel) to open up form 2. So when i click on this text "open form 2" which is the link label, it should open up the windows form2. SOrry but i don't really know how to explain in much detail, hope the above helps abit...thanks!

            frossie

            E Offline
            E Offline
            ednrgc
            wrote on last edited by
            #5

            I didn't know what you meant by "linked" In the onclick event, just create an instance of the 2nd form and show it.

            1 Reply Last reply
            0
            • B bobsugar222

              private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
              {
              Form2 form2 = new Form2();

              form2.Show();
              //or
              form2.ShowDialog();
              

              }

              F Offline
              F Offline
              frossie
              wrote on last edited by
              #6

              Oh ic.. it works! haha thanks! Btw, what's the difference between form2.show and form2.showdialog? I mean i tried with both but i can't spot any visible difference..can u explain in some simple terms? hehe.

              frossie

              J 1 Reply Last reply
              0
              • F frossie

                Oh ic.. it works! haha thanks! Btw, what's the difference between form2.show and form2.showdialog? I mean i tried with both but i can't spot any visible difference..can u explain in some simple terms? hehe.

                frossie

                J Offline
                J Offline
                Jim Warburton
                wrote on last edited by
                #7

                With form2.ShowDialog() form2 must be closed before any other window will be active, with form2.Show() you will be able to work in any window.

                1 Reply Last reply
                0
                • F frossie

                  i created 2 forms in a project. 2 forms namely, form1 and form2. form1 uses a linklabel control (System.Windows.Forms.LinkLabel) to open up form 2. So when i click on this text "open form 2" which is the link label, it should open up the windows form2. SOrry but i don't really know how to explain in much detail, hope the above helps abit...thanks!

                  frossie

                  R Offline
                  R Offline
                  Rocky
                  wrote on last edited by
                  #8

                  Simple... just throw a link object on the form in the designer u know and double click on that, this will open the click event. In taht click event just write your code as, form2.ShowDialog(this); Rocky

                  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