Click here to Skip to main content
15,879,239 members
Home / Discussions / C#
   

C#

 
GeneralRe: C# code Pin
R@vuri10-Apr-12 18:50
R@vuri10-Apr-12 18:50 
GeneralRe: C# code Pin
Abhinav S10-Apr-12 19:39
Abhinav S10-Apr-12 19:39 
QuestionHow to make a new MDI child form maximum size? Pin
fantasy121510-Apr-12 15:42
fantasy121510-Apr-12 15:42 
AnswerRe: How to make a new MDI child form maximum size? Pin
Karthik Harve10-Apr-12 18:17
professionalKarthik Harve10-Apr-12 18:17 
GeneralRe: How to make a new MDI child form maximum size? Pin
fantasy121510-Apr-12 22:56
fantasy121510-Apr-12 22:56 
QuestionList Box Sudden Exit On Selection Pin
PDTUM10-Apr-12 13:33
PDTUM10-Apr-12 13:33 
AnswerRe: List Box Sudden Exit On Selection Pin
Richard Andrew x6410-Apr-12 14:01
professionalRichard Andrew x6410-Apr-12 14:01 
AnswerRe: List Box Sudden Exit On Selection Pin
Luc Pattyn10-Apr-12 15:35
sitebuilderLuc Pattyn10-Apr-12 15:35 
A lot of Controls, including System.Windows.Forms.ListBox will fire unexpected events, forcing you to code defensively. As an example, a SelectionChanged event (or whatever it is called) may be fired when an item gets deselected, which you can check by looking for a negative SelectedIndex, or a SelectedItem being null. If you don't, you're bound to run into trouble.

Also don't be surprised it you use OwnerDraw mode and get MeasureItem/DrawItem events with an index of -1.

IMO all these can be avoided by proper testing before acting; and all can be caught with proper try-catch constructs.

Finally, without actual code, we can't provide more specific help. I have noticed you seldom provide code when in fact you should.

Smile | :)
Luc Pattyn [My Articles] Nil Volentibus Arduum

AnswerRe: List Box Sudden Exit On Selection Pin
PDTUM11-Apr-12 5:52
PDTUM11-Apr-12 5:52 
AnswerRe: List Box Sudden Exit On Selection Pin
BobJanova10-Apr-12 23:21
BobJanova10-Apr-12 23:21 
QuestionC# App to/from MetaTrader 4 Pin
iltallman10-Apr-12 12:28
iltallman10-Apr-12 12:28 
QuestionHow I can isolate a Keyboard in the operative system? Pin
tsw198510-Apr-12 7:49
tsw198510-Apr-12 7:49 
AnswerRe: How I can isolate a Keyboard in the operative system? Pin
Dave Kreskowiak10-Apr-12 8:11
mveDave Kreskowiak10-Apr-12 8:11 
GeneralRe: How I can isolate a Keyboard in the operative system? Pin
tsw198510-Apr-12 10:05
tsw198510-Apr-12 10:05 
GeneralRe: How I can isolate a Keyboard in the operative system? Pin
Dave Kreskowiak10-Apr-12 10:24
mveDave Kreskowiak10-Apr-12 10:24 
GeneralRe: How I can isolate a Keyboard in the operative system? Pin
tsw198510-Apr-12 10:45
tsw198510-Apr-12 10:45 
GeneralRe: How I can isolate a Keyboard in the operative system? Pin
PIEBALDconsult10-Apr-12 11:37
mvePIEBALDconsult10-Apr-12 11:37 
GeneralRe: How I can isolate a Keyboard in the operative system? Pin
Dave Kreskowiak10-Apr-12 14:21
mveDave Kreskowiak10-Apr-12 14:21 
GeneralRe: How I can isolate a Keyboard in the operative system? Pin
tsw198511-Apr-12 1:17
tsw198511-Apr-12 1:17 
AnswerRe: How I can isolate a Keyboard in the operative system? Pin
jschell10-Apr-12 8:32
jschell10-Apr-12 8:32 
AnswerRe: How I can isolate a Keyboard in the operative system? Pin
PIEBALDconsult10-Apr-12 10:40
mvePIEBALDconsult10-Apr-12 10:40 
QuestionSend SMS using GSM modem Pin
zakirox12310-Apr-12 5:50
zakirox12310-Apr-12 5:50 
AnswerRe: Send SMS using GSM modem Pin
kevinnicol10-Apr-12 6:33
kevinnicol10-Apr-12 6:33 
Questionc# calling Stored Procedures Pin
si_6910-Apr-12 5:39
si_6910-Apr-12 5:39 
AnswerRe: c# calling Stored Procedures Pin
Pete O'Hanlon10-Apr-12 5:47
mvePete O'Hanlon10-Apr-12 5:47 

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.