日期:2014-05-20  浏览次数:20936 次

vs2005简体版写的程序怎么不能在繁体版的WINDOWS2003下运行
错误是
See   the   end   of   this   message   for   details   on   invoking  
just-in-time   (JIT)   debugging   instead   of   this   dialog   box.

**************   Exception   Text   **************
System.FormatException:   Input   string   was   not   in   a   correct   format.
      at   System.Number.StringToNumber(String   str,   NumberStyles   options,   NumberBuffer&   number,   NumberFormatInfo   info,   Boolean   parseDecimal)
      at   System.Number.ParseInt32(String   s,   NumberStyles   style,   NumberFormatInfo   info)
      at   System.Int16.Parse(String   s,   NumberStyles   style,   NumberFormatInfo   info)
      at   System.Convert.ToInt16(String   value)
      at   aymtv.Form1.button2_Click(Object   sender,   EventArgs   e)
      at   System.Windows.Forms.Control.OnClick(EventArgs   e)
      at   System.Windows.Forms.Button.OnClick(EventArgs   e)
      at   System.Windows.Forms.Button.OnMouseUp(MouseEventArgs   mevent)
      at   System.Windows.Forms.Control.WmMouseUp(Message&   m,   MouseButtons   button,   Int32   clicks)
      at   System.Windows.Forms.Control.WndProc(Message&   m)
      at   System.Windows.Forms.ButtonBase.WndProc(Message&   m)
      at   System.Windows.Forms.Button.WndProc(Message&   m)
      at   System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&   m)
      at   System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&   m)
      at   System.Windows.Forms.NativeWindow.Callback(IntPtr   hWnd,   Int32   msg,   IntPtr   wparam,   IntPtr   lparam)




------解决方案--------------------
估计你在字符串转数字的时候用的字符编码不符,用unicode编码吧。
------解决方案--------------------
System.FormatException: Input string was not in a correct format.
字符串格式错误,你还是跟踪一下把字符串显示出来看看