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. can not open new form problem?

can not open new form problem?

Scheduled Pinned Locked Moved C#
helpquestion
4 Posts 3 Posters 1 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.
  • M Offline
    M Offline
    miss YY
    wrote on last edited by
    #1

    private void button5_Click(object sender, EventArgs e) { Form2 frm2 = new Form2(); frm2.Show(); } when i run the code ,click button5,not any happened to me,Form1 still Form1,Form2 still not show?it just as have never happened? what's the reason?thanks every to help me !

    S 1 Reply Last reply
    0
    • M miss YY

      private void button5_Click(object sender, EventArgs e) { Form2 frm2 = new Form2(); frm2.Show(); } when i run the code ,click button5,not any happened to me,Form1 still Form1,Form2 still not show?it just as have never happened? what's the reason?thanks every to help me !

      S Offline
      S Offline
      Saksida Bojan
      wrote on last edited by
      #2

      did you assign event handle?

      buttion5.Click += new Systen.EventHandle(button5_Click);

      If designer did create button5_Click function, then it should assign Click event

      M 1 Reply Last reply
      0
      • S Saksida Bojan

        did you assign event handle?

        buttion5.Click += new Systen.EventHandle(button5_Click);

        If designer did create button5_Click function, then it should assign Click event

        M Offline
        M Offline
        miss YY
        wrote on last edited by
        #3

        not that,i use button1 and other buttons,it also do not work

        RaviBeeR 1 Reply Last reply
        0
        • M miss YY

          not that,i use button1 and other buttons,it also do not work

          RaviBeeR Offline
          RaviBeeR Offline
          RaviBee
          wrote on last edited by
          #4

          Form2 is being destructed immediately after the Show() method, causing it to be closed. /ravi

          My new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com

          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