Click here to Skip to main content
16,006,378 members
Home / Discussions / C#
   

C#

 
QuestionCreating RSS Reader Using New Windows RSS Platform Pin
William Spencer15-Apr-07 12:24
William Spencer15-Apr-07 12:24 
AnswerRe: Creating RSS Reader Using New Windows RSS Platform Pin
Judah Gabriel Himango16-Apr-07 10:18
sponsorJudah Gabriel Himango16-Apr-07 10:18 
QuestionOverload resolution failed in ReportViewer Pin
AndrusM15-Apr-07 12:00
AndrusM15-Apr-07 12:00 
QuestionCannot access disposed object error Pin
AndrusM15-Apr-07 11:55
AndrusM15-Apr-07 11:55 
AnswerRe: Cannot access disposed object error Pin
Luc Pattyn15-Apr-07 13:50
sitebuilderLuc Pattyn15-Apr-07 13:50 
GeneralRe: Cannot access disposed object error Pin
AndrusM16-Apr-07 4:44
AndrusM16-Apr-07 4:44 
GeneralRe: Cannot access disposed object error Pin
Luc Pattyn16-Apr-07 7:07
sitebuilderLuc Pattyn16-Apr-07 7:07 
GeneralRe: Cannot access disposed object error Pin
AndrusM16-Apr-07 7:48
AndrusM16-Apr-07 7:48 
Luc Pattyn wrote:
IDEA 1


Thank you. Unfortunately, I'm new to C# and have no knowledge how to implement this.

Luc Pattyn wrote:
if you can figure out somehow that scrolling is still going on, you could
postpone the Form.Close() when ESC is pressed.


I have no knowledge how to dedect scrolling.

I set thread exception handler in startup like

public static void Main() {<br />
Application.ThreadException +=<br />
 new System.Threading.ThreadExceptionEventHandler(App_ThreadException);


How to ignore thread error when esc is pressed ?
I think it must be possbile to ignore error message caused by pressing esc.
However, how to store error message handling ?
Should I use timer or is there simpler way ?


Maybe, just maybe, it is sufficient to do an Application.DoEvents() before
calling Close(), but I am not sure at all this will work.


I tried code:

protected override void OnKeyDown(KeyEventArgs e) {<br />
      if (e.KeyCode == Keys.Escape) {<br />
        Application.DoEvents();<br />
        FindForm().Close();<br />
      } else<br />
        base.OnKeyDown(e);<br />
    }


but thread error still occurs.

I can reproduce this error on 2.66 MHZ core duo also when I hold down mouse button and press Esc in scroll time. So improving scrolling speed does not help.

Andrus

QuestionGetting Pixel Value Pin
Saikek15-Apr-07 10:27
Saikek15-Apr-07 10:27 
AnswerRe: Getting Pixel Value Pin
Christian Graus15-Apr-07 11:14
protectorChristian Graus15-Apr-07 11:14 
QuestionProblem with ContextMenu? [modified] Pin
Khoramdin15-Apr-07 10:18
Khoramdin15-Apr-07 10:18 
AnswerRe: Problem with ContextMenu? Pin
Judah Gabriel Himango17-Apr-07 3:41
sponsorJudah Gabriel Himango17-Apr-07 3:41 
QuestionReading Data From Database Pin
microuser_200015-Apr-07 9:20
microuser_200015-Apr-07 9:20 
AnswerRe: Reading Data From Database Pin
Christian Graus15-Apr-07 11:15
protectorChristian Graus15-Apr-07 11:15 
QuestionWebBrowser 2.0 in Multithread application Pin
cardy115-Apr-07 8:55
cardy115-Apr-07 8:55 
AnswerRe: WebBrowser 2.0 in Multithread application Pin
Luc Pattyn15-Apr-07 9:26
sitebuilderLuc Pattyn15-Apr-07 9:26 
AnswerRe: WebBrowser 2.0 in Multithread application Pin
cardy115-Apr-07 10:18
cardy115-Apr-07 10:18 
GeneralRe: WebBrowser 2.0 in Multithread application Pin
Luc Pattyn15-Apr-07 11:35
sitebuilderLuc Pattyn15-Apr-07 11:35 
AnswerRe: WebBrowser 2.0 in Multithread application Pin
cardy125-Apr-07 3:41
cardy125-Apr-07 3:41 
QuestionHow to open last form on startup Pin
AndrusM15-Apr-07 8:07
AndrusM15-Apr-07 8:07 
AnswerRe: How to open last form on startup Pin
Christian Graus15-Apr-07 11:28
protectorChristian Graus15-Apr-07 11:28 
GeneralRe: How to open last form on startup Pin
AndrusM15-Apr-07 11:52
AndrusM15-Apr-07 11:52 
GeneralRe: How to open last form on startup Pin
Christian Graus15-Apr-07 12:02
protectorChristian Graus15-Apr-07 12:02 
GeneralRe: How to open last form on startup Pin
AndrusM15-Apr-07 12:12
AndrusM15-Apr-07 12:12 
GeneralRe: How to open last form on startup Pin
Christian Graus15-Apr-07 12:21
protectorChristian Graus15-Apr-07 12:21 

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.