Click here to Skip to main content
15,907,492 members
Home / Discussions / C#
   

C#

 
GeneralSetting focus to the selected list view items Pin
eDip8-Nov-04 21:46
eDip8-Nov-04 21:46 
GeneralRe: Setting focus to the selected list view items Pin
Nick Parker9-Nov-04 7:51
protectorNick Parker9-Nov-04 7:51 
GeneralThe command to call external app Pin
nobita3x8-Nov-04 21:07
nobita3x8-Nov-04 21:07 
GeneralRe: The command to call external app Pin
Stefan Troschuetz8-Nov-04 21:26
Stefan Troschuetz8-Nov-04 21:26 
GeneralRe: The command to call external app Pin
nobita3x8-Nov-04 21:58
nobita3x8-Nov-04 21:58 
GeneralRe: The command to call external app Pin
Stefan Troschuetz8-Nov-04 22:49
Stefan Troschuetz8-Nov-04 22:49 
QuestionHow can I remove items from a listbox? Pin
Julianne_juju8-Nov-04 19:18
Julianne_juju8-Nov-04 19:18 
AnswerRe: How can I remove items from a listbox? Pin
SathishVJ8-Nov-04 19:34
SathishVJ8-Nov-04 19:34 
You can check if an item is present by using the method Contains.

if (myListBox.Items.Contains(targetObject))
{
//then do something
}

You can get the index of a particular item by using the IndexOf method:

myListBox.Items.RemoveAt(myListBox.Items.IndexOf("ItemText"))

Also, here is some uncalled for advice: When you are deleting multiple rows in the listbox, start deleting items from the bottom.

Cheers

~/sathishvj
GeneralRe: How can I remove items from a listbox? Pin
Julianne_juju8-Nov-04 21:08
Julianne_juju8-Nov-04 21:08 
GeneralRe: How can I remove items from a listbox? Pin
Skynyrd8-Nov-04 21:37
Skynyrd8-Nov-04 21:37 
GeneralSystemParametersInfo not working from within service Pin
SathishVJ8-Nov-04 19:15
SathishVJ8-Nov-04 19:15 
GeneralRe: SystemParametersInfo not working from within service Pin
dbman2116-Nov-09 14:27
dbman2116-Nov-09 14:27 
GeneralDebug unsafe function with fixed keyword Pin
Aleksan8-Nov-04 19:03
Aleksan8-Nov-04 19:03 
GeneralRe: Debug unsafe function with fixed keyword Pin
Alex Korchemniy8-Nov-04 19:09
Alex Korchemniy8-Nov-04 19:09 
GeneralRe: Debug unsafe function with fixed keyword Pin
Aleksan8-Nov-04 22:43
Aleksan8-Nov-04 22:43 
GeneralMenu Pin
Yulianto.8-Nov-04 18:25
Yulianto.8-Nov-04 18:25 
GeneralRe: Menu Pin
Alex Korchemniy8-Nov-04 18:37
Alex Korchemniy8-Nov-04 18:37 
GeneralRe: Menu Pin
Yulianto.8-Nov-04 18:40
Yulianto.8-Nov-04 18:40 
GeneralRe: Menu Pin
Alex Korchemniy8-Nov-04 18:47
Alex Korchemniy8-Nov-04 18:47 
GeneralQuestion about random access file Pin
momer8-Nov-04 16:46
momer8-Nov-04 16:46 
GeneralRe: Question about random access file Pin
Alex Korchemniy8-Nov-04 18:02
Alex Korchemniy8-Nov-04 18:02 
GeneralRe: Question about random access file Pin
momer8-Nov-04 18:28
momer8-Nov-04 18:28 
GeneralRe: Question about random access file Pin
Alex Korchemniy8-Nov-04 18:35
Alex Korchemniy8-Nov-04 18:35 
GeneralRe: Question about random access file Pin
momer8-Nov-04 21:36
momer8-Nov-04 21:36 
QuestionHow to rename the table?( SQL Server 2000 wince ) Pin
ting6688-Nov-04 16:11
ting6688-Nov-04 16:11 

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.