Click here to Skip to main content
15,916,318 members
Home / Discussions / C#
   

C#

 
QuestionHow do you send an email message? Pin
David Flores14-Oct-02 5:07
David Flores14-Oct-02 5:07 
AnswerRe: How do you send an email message? Pin
Daniel Turini14-Oct-02 5:12
Daniel Turini14-Oct-02 5:12 
GeneralRe: How do you send an email message? Pin
Pete Bassett14-Oct-02 6:52
Pete Bassett14-Oct-02 6:52 
AnswerRe: How do you send an email message? Pin
leppie14-Oct-02 7:30
leppie14-Oct-02 7:30 
AnswerRe: How do you send an email message? Pin
Hugh Jass14-Oct-02 7:50
Hugh Jass14-Oct-02 7:50 
AnswerRe: How do you send an email message? Pin
Hakan Eskici15-Oct-02 5:36
Hakan Eskici15-Oct-02 5:36 
AnswerRe: How do you send an email message? Pin
David Flores15-Oct-02 8:02
David Flores15-Oct-02 8:02 
GeneralListview - Desperate for help! Pin
Darryl Borden14-Oct-02 4:26
Darryl Borden14-Oct-02 4:26 
I am desperate for help! This is really eating my breakfast, lunch and dinner!

I have a class I have derived from the native ListView class. I have a context menu that I show when the user right clicks on a selected item in the list. When they select the "Delete" option in the context menu, I do a ListView.RemoveAt(index) where index is the index of the item they selected. The remove at works, but when the method returns control to the operating system, I get an unhandled exception with the following exception text.

************** Exception Text **************
System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: '0' is not a valid value for 'displayIndex'.
at System.Windows.Forms.ListViewItemCollection.get_Item(Int32 displayIndex)
at System.Windows.Forms.ListView.LvnBeginDrag(MouseButtons buttons, NMLISTVIEW nmlv)
at System.Windows.Forms.ListView.WmReflectNotify(Message& m)
at System.Windows.Forms.ListView.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

I can find no place in the remainder of my code where I am trying to attempt to access an item from the listview. Can anyone help decipher what my problem is?

dpb

Darryl Borden
Principal IT Analyst
darryl.borden@elpaso.com
GeneralRe: Listview - Desperate for help! Pin
Daniel Turini14-Oct-02 4:59
Daniel Turini14-Oct-02 4:59 
GeneralRe: Listview - Desperate for help! Pin
Darryl Borden14-Oct-02 5:27
Darryl Borden14-Oct-02 5:27 
GeneralRe: Listview - Desperate for help! Pin
Daniel Turini14-Oct-02 5:26
Daniel Turini14-Oct-02 5:26 
QuestionI miss header files. Do you? Pin
Marc Clifton14-Oct-02 1:46
mvaMarc Clifton14-Oct-02 1:46 
AnswerRe: I miss header files. Do you? Pin
Marc Clifton14-Oct-02 1:47
mvaMarc Clifton14-Oct-02 1:47 
GeneralRe: I miss header files. Do you? Pin
Stephane Rodriguez.14-Oct-02 2:00
Stephane Rodriguez.14-Oct-02 2:00 
GeneralRe: I miss header files. Do you? Pin
Marc Clifton14-Oct-02 2:14
mvaMarc Clifton14-Oct-02 2:14 
GeneralRe: I miss header files. Do you? Pin
leppie14-Oct-02 7:21
leppie14-Oct-02 7:21 
GeneralRe: I miss header files. Do you? Pin
Maciej Pirog14-Oct-02 7:33
Maciej Pirog14-Oct-02 7:33 
GeneralRe: I miss header files. Do you? Pin
leppie14-Oct-02 8:19
leppie14-Oct-02 8:19 
GeneralRe: I miss header files. Do you? Pin
Maciej Pirog15-Oct-02 6:59
Maciej Pirog15-Oct-02 6:59 
AnswerRe: I miss header files. Do you? Pin
David Stone14-Oct-02 4:36
sitebuilderDavid Stone14-Oct-02 4:36 
AnswerRe: Try to use #region Pin
Masaaki Onishi14-Oct-02 7:55
Masaaki Onishi14-Oct-02 7:55 
GeneralRe: Try to use #region Pin
Stephane Rodriguez.14-Oct-02 9:13
Stephane Rodriguez.14-Oct-02 9:13 
GeneralRegional Settings Pin
daristos13-Oct-02 22:32
daristos13-Oct-02 22:32 
GeneralRe: Regional Settings Pin
Luis Alonso Ramos14-Oct-02 4:04
Luis Alonso Ramos14-Oct-02 4:04 
GeneralRe: Regional Settings Pin
Andrew Lewis16-Oct-02 12:04
Andrew Lewis16-Oct-02 12:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.