Click here to Skip to main content
15,895,084 members
Home / Discussions / C#
   

C#

 
GeneralRe: Back Porting Application Pin
Dave Kreskowiak13-Sep-07 9:33
mveDave Kreskowiak13-Sep-07 9:33 
QuestionClosing a form Pin
Justin Perez13-Sep-07 4:38
Justin Perez13-Sep-07 4:38 
AnswerRe: Closing a form Pin
Lutosław13-Sep-07 4:50
Lutosław13-Sep-07 4:50 
AnswerRe: Closing a form Pin
Michael Potter13-Sep-07 4:57
Michael Potter13-Sep-07 4:57 
Questionhide/disable MyComputer/drives Pin
H.R13-Sep-07 4:30
H.R13-Sep-07 4:30 
AnswerRe: hide/disable MyComputer/drives Pin
Frank Kerrigan13-Sep-07 6:20
Frank Kerrigan13-Sep-07 6:20 
QuestionChecking if any items in a listbox are selected Pin
Lucy13-Sep-07 3:33
Lucy13-Sep-07 3:33 
AnswerRe: Checking if any items in a listbox are selected Pin
Luc Pattyn13-Sep-07 4:03
sitebuilderLuc Pattyn13-Sep-07 4:03 
Hi,

are the listbox items selected when the form loads?
what happens when the selection changes after form load?

My view (assuming you can select at most one item per listbox):
- add OnSelectedIndexChanged event handlers;
- do all your related stuff in there;
- don't be surprised if OnSelectedIndexChanged also fires when an item gets unselected;
- there is no need for separate variables such as selectedItem1, adding them increases
the chance your object state becomes inconsistent, and that would make debugging much
more complex.

Smile | :)



Luc Pattyn [Forum Guidelines] [My Articles]


this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google


GeneralRe: Checking if any items in a listbox are selected Pin
Lucy13-Sep-07 4:23
Lucy13-Sep-07 4:23 
GeneralRe: Checking if any items in a listbox are selected Pin
alisardar13-Sep-07 10:03
alisardar13-Sep-07 10:03 
AnswerRe: Checking if any items in a listbox are selected Pin
led mike13-Sep-07 4:28
led mike13-Sep-07 4:28 
GeneralRe: Checking if any items in a listbox are selected Pin
Lucy13-Sep-07 4:42
Lucy13-Sep-07 4:42 
GeneralRe: Checking if any items in a listbox are selected Pin
led mike13-Sep-07 7:38
led mike13-Sep-07 7:38 
QuestionMemory Usage Pin
student_rhr13-Sep-07 3:21
student_rhr13-Sep-07 3:21 
AnswerRe: Memory Usage Pin
Guffa13-Sep-07 3:28
Guffa13-Sep-07 3:28 
GeneralRe: Memory Usage Pin
student_rhr13-Sep-07 4:12
student_rhr13-Sep-07 4:12 
GeneralRe: Memory Usage Pin
Lutosław13-Sep-07 4:53
Lutosław13-Sep-07 4:53 
AnswerRe: Memory Usage Pin
Urs Enzler13-Sep-07 3:57
Urs Enzler13-Sep-07 3:57 
AnswerRe: Memory Usage Pin
Judah Gabriel Himango13-Sep-07 9:47
sponsorJudah Gabriel Himango13-Sep-07 9:47 
QuestionReversible Cipher Question Pin
paas13-Sep-07 3:20
paas13-Sep-07 3:20 
AnswerRe: Reversible Cipher Question Pin
Colin Angus Mackay13-Sep-07 3:28
Colin Angus Mackay13-Sep-07 3:28 
AnswerRe: Reversible Cipher Question Pin
Dan Neely13-Sep-07 3:58
Dan Neely13-Sep-07 3:58 
GeneralRe: Reversible Cipher Question Pin
paas13-Sep-07 4:24
paas13-Sep-07 4:24 
GeneralRe: Reversible Cipher Question Pin
Mark Churchill13-Sep-07 15:29
Mark Churchill13-Sep-07 15:29 
AnswerRe: Reversible Cipher Question Pin
Luc Pattyn13-Sep-07 4:07
sitebuilderLuc Pattyn13-Sep-07 4:07 

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.