locked
Very weird error when trying to build my main form [Need help ASAP so I can release a much needed update] RRS feed

  • Question

  • Every time I try to access 'MainForm' or use any "Me.[expression]" I run into the following error, traced to this specific line of code. I have no warning or errors in my tray until the 'MainForm' is called. 

    For example, after 'splash' finishes, I call my 'MainForm' by using;

    MainForm.Show()

    This worked until today, and now every time the form is called, this error appears. Anything I can do? I made no major changes to the app.

    Thank you very much in advance for any help.

    http://i.imgur.com/SDC5Raa.jpg

    EDIT: I guess I should mention that I'm using NET4.5



    • Edited by Graphia Sunday, June 14, 2015 3:12 PM see edit
    Sunday, June 14, 2015 3:07 PM

Answers

  • Try turning on Option Strict and see if that reveals where there is a string being assigned to an integer.  Somewhere you have a string which is expected to have a numeric value but instead is empty.

    Also, its always been a bad idea in the past to name a form "MainForm" as it could cause name resolution errors; not sure if this is still an issue since I always avoid using that form name.


    Reed Kimble - "When you do things right, people won't be sure you've done anything at all"

    • Proposed as answer by Cor Ligthert Sunday, June 14, 2015 3:49 PM
    • Marked as answer by Graphia Sunday, June 14, 2015 4:26 PM
    Sunday, June 14, 2015 3:20 PM

All replies

  • Try turning on Option Strict and see if that reveals where there is a string being assigned to an integer.  Somewhere you have a string which is expected to have a numeric value but instead is empty.

    Also, its always been a bad idea in the past to name a form "MainForm" as it could cause name resolution errors; not sure if this is still an issue since I always avoid using that form name.


    Reed Kimble - "When you do things right, people won't be sure you've done anything at all"

    • Proposed as answer by Cor Ligthert Sunday, June 14, 2015 3:49 PM
    • Marked as answer by Graphia Sunday, June 14, 2015 4:26 PM
    Sunday, June 14, 2015 3:20 PM
  • Hey, thanks for answering. I'll look into it now and get back to you! :)
    Sunday, June 14, 2015 4:14 PM
  • Great, I've looked over the code and came to the conclusion that a setting was producing a boolean value and not an integer value as was requested by the code. Thanks :)
    Sunday, June 14, 2015 4:27 PM