【问题标题】:Windows Forms Designer Float overflowWindows 窗体设计器浮动溢出
【发布时间】:2010-06-21 12:31:43
【问题描述】:

我不确定发生了什么变化,但由于某种原因,我在使用 Visual Studio 2008 Windows 窗体设计器时遇到了问题:

C++ CodeDOM 解析器错误:行:1978,列:80 --- 浮点溢出

调用堆栈似乎也没有指向我的任何代码:

 at Microsoft.VisualC.CppCodeParser.OnMethodPopulateStatements(Object sender, EventArgs e)
 at System.CodeDom.CodeMemberMethod.get_Statements()
 at System.ComponentModel.Design.Serialization.TypeCodeDomSerializer.Deserialize(IDesignerSerializationManager manager, CodeTypeDeclaration declaration)
 at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager manager)
 at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager serializationManager)
 at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.DeferredLoadHandler.Microsoft.VisualStudio.TextManager.Interop.IVsTextBufferDataEvents.OnLoadCompleted(Int32 fReload) 

如果我编译并运行代码,它就可以正常工作。有谁知道我为什么会看到这个问题?

【问题讨论】:

    标签: winforms visual-studio-2008 floating-point overflow designer


    【解决方案1】:
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
    

    【讨论】:

      【解决方案2】:

      知道了。我已经替换了以下内容:

      this->m_cmbStepSelect->Items->AddRange(gcnew cli::array< System::Object^  >(5) {L"String1", L"String2", L"String3", L"String4", L"String5"});
      

      与:

      #define NUM_OF_STRINGS (5)
      this->m_cmbStepSelect->Items->AddRange(gcnew cli::array< System::Object^  >(NUM_OF_STRINGS) {L"String1", L"String2", L"String3", L"String4", L"String5"});
      

      ...把设计师扔了。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2013-05-05
        • 2023-03-12
        • 1970-01-01
        • 2011-05-25
        • 1970-01-01
        相关资源
        最近更新 更多