locked
C# Window Form error designer RRS feed

  • Question

  • This Message was shown when I opened the project. (https://drive.google.com/open?id=1FUkZobGTDl_DlqHoYB3t7NQOmuW2mYgc)

    This errors was shown in designer. (https://drive.google.com/open?id=12HDKXEZUAk4EWwz2zgV9_Wcc0tLbDODx)

    But Everything is fine when I debug the projects, but I concern that it's will be corrupted one day as my old project.

    https://drive.google.com/open?id=15gx_1AOr9YmJMDuGTtRc980eXYPEcJ5W

    More Pic

    Any idea how to solve this problem!!!

    Project source code (.sln)https://drive.google.com/open?id=1COU6I8aY4pXvc9gNWQ9cEcpGN1ZD4bRL

    Thank in advance!!



    • Edited by Raymond MLD Friday, August 10, 2018 2:36 PM
    Friday, August 10, 2018 2:34 PM

Answers

  • To show form it is necessary to interpret some methods of form. Maybe there is problem in your code, something like query to database, which is not called in design mode and then it throws null reference exception. In component there is DesignMode property which you can use to check if it is in design mode or not and change form behavior based on it.
    • Marked as answer by Raymond MLD Saturday, August 11, 2018 1:37 PM
    Saturday, August 11, 2018 7:05 AM
  • Hello,

    According to the screenshots you have a user control that is not behaving properly, this is where the issue resides.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.
    VB Forums - moderator
    profile for Karen Payne on Stack Exchange, a network of free, community-driven Q&A sites

    • Marked as answer by Raymond MLD Saturday, August 11, 2018 1:37 PM
    Saturday, August 11, 2018 11:33 AM

All replies

  • To show form it is necessary to interpret some methods of form. Maybe there is problem in your code, something like query to database, which is not called in design mode and then it throws null reference exception. In component there is DesignMode property which you can use to check if it is in design mode or not and change form behavior based on it.
    • Marked as answer by Raymond MLD Saturday, August 11, 2018 1:37 PM
    Saturday, August 11, 2018 7:05 AM
  • Hello,

    According to the screenshots you have a user control that is not behaving properly, this is where the issue resides.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.
    VB Forums - moderator
    profile for Karen Payne on Stack Exchange, a network of free, community-driven Q&A sites

    • Marked as answer by Raymond MLD Saturday, August 11, 2018 1:37 PM
    Saturday, August 11, 2018 11:33 AM
  • Hello brother.

    Anyway after I moved my project code from this to new one in other folder the problem hasn't been shown anymore. But CODE is the same as before. How is it possible? 

    Saturday, August 11, 2018 1:39 PM
  • Hello brother.

    Anyway after I moved my project code from this to new one in other folder the problem hasn't been shown anymore. But CODE is the same as before. How is it possible? 

    Saturday, August 11, 2018 1:39 PM
  • Hi Raymond,

    You shouldn't be putting much else in the constructor than the InitializeComponent(). Everything else that you've got there should go in a Form Load event handler.


    ~~Bonnie DeWitt [C# MVP]

    http://geek-goddess-bonnie.blogspot.com

    Saturday, August 11, 2018 11:15 PM