From: Rachit verma on
Unhandled Exception:

InvalidArgument=Value of '41' is not valid for 'SelectedIndex'.
Parameter name: SelectedIndex

System.ArgumentOutOfRangeException

Stack Trace:
at System.Windows.Forms.ComboBox.set_SelectedIndex(Int32 value)
at SpeedConnect7VB.SpeedConnect.Display_Defaults()
at SpeedConnect7VB.SpeedConnect.SpeedConnect_Load(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.SetVisibleCore(Boolean value)
at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
at System.Windows.Forms.Control.Show()
at SpeedConnect.FormOptimizer.ReloadOptimizer()
at SpeedConnect.FormOptimizer.FormOptimizer_VisibleChanged(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnVisibleChanged(EventArgs e)
at System.Windows.Forms.ScrollableControl.OnVisibleChanged(EventArgs e)
at System.Windows.Forms.Form.OnVisibleChanged(EventArgs e)
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.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)

From http://www.google.co.in/search?client=firefox-a&rls=org.mozilla:en-US:official&channel=s&hl=en&source=hp&q=+InvalidArgument=Value+of+'41'+is+not+valid+for+'SelectedIndex'.&meta=&btnG=Google+Search

Posted via DevelopmentNow.com Groups
http://www.developmentnow.com/g/
From: Family Tree Mike on
Rachit verma wrote:
> Unhandled Exception:
>
> InvalidArgument=Value of '41' is not valid for 'SelectedIndex'.
> Parameter name: SelectedIndex
>
> System.ArgumentOutOfRangeException

I'm not sure why you responded to a post from several years ago...

At the line where you get the error, how many items does the debugger
say are in the control? If there are 41 items, you must use
SelectedIndex in the range 0 to 40.

--
Mike