23-12-19, 04:28 AM
هناك خطأ في الكود
ChangeIP("192.168.1." & i.ToString("000"))
Txt_IPAddress.Text = "192.168.1." & i.ToString("000")
System.InvalidCastException
HResult=0x80004002
Message=Conversion from string "192.168.1.001" to type 'Integer' is not valid.
Source=Microsoft.VisualBasic
StackTrace:
at Microsoft.VisualBasic.CompilerServices.Conversions.ToInteger(String Value)
at ChangeIPAddressXT.Form1.Timer1_Tick(Object sender, EventArgs e) in C:\Users\ahmed-pc\Downloads\ChangeIPAddressXT\ChangeIPAddressXT\Form1.vb:line 44
at System.Windows.Forms.Timer.OnTick(EventArgs e)
at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
at ChangeIPAddressXT.My.MyApplication.Main(String[] Args) in :line 81
Inner Exception 1:
FormatException: Input string was not in a correct format.
ChangeIP("192.168.1." & i.ToString("000"))
Txt_IPAddress.Text = "192.168.1." & i.ToString("000")
System.InvalidCastException
HResult=0x80004002
Message=Conversion from string "192.168.1.001" to type 'Integer' is not valid.
Source=Microsoft.VisualBasic
StackTrace:
at Microsoft.VisualBasic.CompilerServices.Conversions.ToInteger(String Value)
at ChangeIPAddressXT.Form1.Timer1_Tick(Object sender, EventArgs e) in C:\Users\ahmed-pc\Downloads\ChangeIPAddressXT\ChangeIPAddressXT\Form1.vb:line 44
at System.Windows.Forms.Timer.OnTick(EventArgs e)
at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
at ChangeIPAddressXT.My.MyApplication.Main(String[] Args) in :line 81
Inner Exception 1:
FormatException: Input string was not in a correct format.
