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. Visual Basic
  4. How to display a new button from Form1 to Form2

How to display a new button from Form1 to Form2

Scheduled Pinned Locked Moved Visual Basic
helpcsharptutorial
4 Posts 4 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.
  • L Offline
    L Offline
    LAPEC
    wrote on last edited by
    #1

    Dear Sir / Madam I have created a VB .NET 2005 project with 2 Forms. Form1 has a Panel1 which is an empty Panel1. Form2 has a Panel2 with 34 buttons inside this Panel2. Now i'm stuck on one problem! Here is the explonation of my application... 1) The application loads up and calls Form1 2) On Form1 I click a button to call Form2 3) Form2 loads up (which is a form with Panel2 and 34 buttons inside this Panel2) 4) Now when I click on any of these buttons inside the Panel2 (such as Button1, Button2, Button3 etc...), I want to create a new button and palce it inside the Panel1 with the AddressOf whatever button I may click. E.g. Button1.click -> create new Button -> AddressOf -> Button1.click If anyone could help me on this by showing with a sample of source code it would be very greatful to me. I'm a student and very new to VB .NET programming. I'm looking forward to hear from you. Kind regards Roni

    N L D 3 Replies Last reply
    0
    • L LAPEC

      Dear Sir / Madam I have created a VB .NET 2005 project with 2 Forms. Form1 has a Panel1 which is an empty Panel1. Form2 has a Panel2 with 34 buttons inside this Panel2. Now i'm stuck on one problem! Here is the explonation of my application... 1) The application loads up and calls Form1 2) On Form1 I click a button to call Form2 3) Form2 loads up (which is a form with Panel2 and 34 buttons inside this Panel2) 4) Now when I click on any of these buttons inside the Panel2 (such as Button1, Button2, Button3 etc...), I want to create a new button and palce it inside the Panel1 with the AddressOf whatever button I may click. E.g. Button1.click -> create new Button -> AddressOf -> Button1.click If anyone could help me on this by showing with a sample of source code it would be very greatful to me. I'm a student and very new to VB .NET programming. I'm looking forward to hear from you. Kind regards Roni

      N Offline
      N Offline
      nlarson11
      wrote on last edited by
      #2

      since you already know about addressof, then take it further and use a delegate. pass a delegate to form2 and invoke it back on form1 and create the button calling some routine in form1 to do so...

      1 Reply Last reply
      0
      • L LAPEC

        Dear Sir / Madam I have created a VB .NET 2005 project with 2 Forms. Form1 has a Panel1 which is an empty Panel1. Form2 has a Panel2 with 34 buttons inside this Panel2. Now i'm stuck on one problem! Here is the explonation of my application... 1) The application loads up and calls Form1 2) On Form1 I click a button to call Form2 3) Form2 loads up (which is a form with Panel2 and 34 buttons inside this Panel2) 4) Now when I click on any of these buttons inside the Panel2 (such as Button1, Button2, Button3 etc...), I want to create a new button and palce it inside the Panel1 with the AddressOf whatever button I may click. E.g. Button1.click -> create new Button -> AddressOf -> Button1.click If anyone could help me on this by showing with a sample of source code it would be very greatful to me. I'm a student and very new to VB .NET programming. I'm looking forward to hear from you. Kind regards Roni

        L Offline
        L Offline
        leckey 0
        wrote on last edited by
        #3

        isn't this the same question you have asked several times and been told the answer?

        ______________________ stuff + cats = awesome

        1 Reply Last reply
        0
        • L LAPEC

          Dear Sir / Madam I have created a VB .NET 2005 project with 2 Forms. Form1 has a Panel1 which is an empty Panel1. Form2 has a Panel2 with 34 buttons inside this Panel2. Now i'm stuck on one problem! Here is the explonation of my application... 1) The application loads up and calls Form1 2) On Form1 I click a button to call Form2 3) Form2 loads up (which is a form with Panel2 and 34 buttons inside this Panel2) 4) Now when I click on any of these buttons inside the Panel2 (such as Button1, Button2, Button3 etc...), I want to create a new button and palce it inside the Panel1 with the AddressOf whatever button I may click. E.g. Button1.click -> create new Button -> AddressOf -> Button1.click If anyone could help me on this by showing with a sample of source code it would be very greatful to me. I'm a student and very new to VB .NET programming. I'm looking forward to hear from you. Kind regards Roni

          D Offline
          D Offline
          Duane in Japan
          wrote on last edited by
          #4

          http://msdn2.microsoft.com/en-us/library/system.windows.forms.form(VS.71).aspx This may get you started, I thought I saw your answer a few days ago but this is all that I could find NOW.

          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