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. UIS Application\MainDialog.Designer.cs

UIS Application\MainDialog.Designer.cs

Scheduled Pinned Locked Moved C#
helpcsharpdebuggingtutorial
7 Posts 3 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.
  • Z Offline
    Z Offline
    zhiyuan16
    wrote on last edited by
    #1

    dear all i am newbe with C#, i got a problem when i am debug, the issue is as following: Error 2 The type 'UIS_Application.MainDialog' already contains a definition for 'toolBtnRun' C:\Documents and Settings\LI ZHIYUAN\Desktop\UIS Application\UIS Application\UIS Application\MainDialog.Designer.cs 555 54 UIS Application how to solve this issu. thanks a lot.

    L 1 Reply Last reply
    0
    • Z zhiyuan16

      dear all i am newbe with C#, i got a problem when i am debug, the issue is as following: Error 2 The type 'UIS_Application.MainDialog' already contains a definition for 'toolBtnRun' C:\Documents and Settings\LI ZHIYUAN\Desktop\UIS Application\UIS Application\UIS Application\MainDialog.Designer.cs 555 54 UIS Application how to solve this issu. thanks a lot.

      L Offline
      L Offline
      Luc Pattyn
      wrote on last edited by
      #2

      So you declared toolBtnRun more than once. Use "Find in Files (entire project)" to locate the redundant one(s). :)

      Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum

      Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.

      Z 1 Reply Last reply
      0
      • L Luc Pattyn

        So you declared toolBtnRun more than once. Use "Find in Files (entire project)" to locate the redundant one(s). :)

        Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum

        Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.

        Z Offline
        Z Offline
        zhiyuan16
        wrote on last edited by
        #3

        thanks sir, acutally i found already by this way, i couldn't find where i definded more than one. and moreever i couldn't display the "MainDialog GUI", when i double clicked the "maindialog" then the following dialog display and content is : object reference not set to an instances of an object. how to solve it. thanks

        D L 2 Replies Last reply
        0
        • Z zhiyuan16

          thanks sir, acutally i found already by this way, i couldn't find where i definded more than one. and moreever i couldn't display the "MainDialog GUI", when i double clicked the "maindialog" then the following dialog display and content is : object reference not set to an instances of an object. how to solve it. thanks

          D Offline
          D Offline
          Dan Mos
          wrote on last edited by
          #4

          the object reference not set to an instances of an object refers to the fact that you have no instance of MainDialog initialized. Ex:

          SomeClass sc;
          sc.SomeProperty = "Blah";

          would yield the same error message => object reference not set to an instances of an object That is because the sc isn't initialized. In fact it's null. It references/points to nothing. Needed sc = new SomeClass(); before using the reference.

          I bug

          Z 1 Reply Last reply
          0
          • Z zhiyuan16

            thanks sir, acutally i found already by this way, i couldn't find where i definded more than one. and moreever i couldn't display the "MainDialog GUI", when i double clicked the "maindialog" then the following dialog display and content is : object reference not set to an instances of an object. how to solve it. thanks

            L Offline
            L Offline
            Luc Pattyn
            wrote on last edited by
            #5

            if you mean double-clicking a form in the solution pane leads to an exception, that must be because some of your code (including the default constructor) gets executed by Visual Designer and a fault of yours results in an Exception. You could always right-click the form, choose "View Code" and go look for the problem. :)

            Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum

            Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.

            1 Reply Last reply
            0
            • D Dan Mos

              the object reference not set to an instances of an object refers to the fact that you have no instance of MainDialog initialized. Ex:

              SomeClass sc;
              sc.SomeProperty = "Blah";

              would yield the same error message => object reference not set to an instances of an object That is because the sc isn't initialized. In fact it's null. It references/points to nothing. Needed sc = new SomeClass(); before using the reference.

              I bug

              Z Offline
              Z Offline
              zhiyuan16
              wrote on last edited by
              #6

              thanks sir, i solved already according to your help. here another problem for me, when i set the "maindialog" as topmost, however when i click the mnubutton to display a dialog, it can't be display outside, it displayed the behind the maindialog, if i set the maindialog as normal then it can display, however when i want to run my maindialog, i want it as topmost. how to display the other dialog outside the maindialog when i set maindialog as topmost. thanks a lot

              D 1 Reply Last reply
              0
              • Z zhiyuan16

                thanks sir, i solved already according to your help. here another problem for me, when i set the "maindialog" as topmost, however when i click the mnubutton to display a dialog, it can't be display outside, it displayed the behind the maindialog, if i set the maindialog as normal then it can display, however when i want to run my maindialog, i want it as topmost. how to display the other dialog outside the maindialog when i set maindialog as topmost. thanks a lot

                D Offline
                D Offline
                Dan Mos
                wrote on last edited by
                #7

                Make it (the other form top most through code):

                Form2 f = new Form2();
                f.TopMost = true;
                f.ShowDialog();

                I bug

                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