Click here to Skip to main content
15,911,711 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
System.FormatException was unhandled
  HResult=-2146233033
  Message=A cadeia de caracteres de entrada não estava em um formato incorreto.
  Source=mscorlib
  StackTrace:
       em System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
       em System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
       em MediaControl.AudioPlayer.get_Position()
       em MediaControl.AudioPlayer.timer1_Tick(Object sender, EventArgs e)
       em System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
       em System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       em System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
       em System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
       em System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
       em System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
       em MyPlayer.frmAudio.Main() na C:\Users\Bruno Soares\Desktop\MyPlayer\frmAudio.vb:linha 0
       em System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       em Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       em System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       em System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       em System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       em System.Threading.ThreadHelper.ThreadStart()
  InnerException: 

FULL CODE: PASTEBIN - LINK[^]

I don't know what is happening
I already try to put try statement on every sub on the code :(
Please help guys.
Posted

Im not really familiar with VB.Net - but looking at the code, you have 3 interops declared - I would put some tracing into your program immediately before these interops are called/used so you can check the values being passed

Obviously if you could use breakpoints, tracing, to narrow it down to a specific line of code a bit your life would be easier
 
Share this answer
 
Comments
Bruno C Soares 16-Jan-14 18:31pm    
The program runs normally musics files
but when i try to put huge playlist this exception happens
Come on, where is the problem exactly, what did you try upto now? When I do a Google search for System.Number.StringToNumber and FormatException, I get many results. E.g. http://support.microsoft.com/kb/942460[^] describes a bug. But: are you sure that the user entered numbers in a format which is acceptable for your regional (Portugese or Brasilian or so - in any case: not US English) settings?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900