Click here to Skip to main content
15,908,661 members
Home / Discussions / C#
   

C#

 
QuestionHow to return the result of a function in a thread? Pin
rushing7-Oct-05 15:24
rushing7-Oct-05 15:24 
AnswerRe: How to return the result of a function in a thread? Pin
S. Senthil Kumar7-Oct-05 20:50
S. Senthil Kumar7-Oct-05 20:50 
QuestionThe TcpClient is so slowly to create. Pin
rushing7-Oct-05 15:21
rushing7-Oct-05 15:21 
Questionc# 2.0 exam Pin
fmardani7-Oct-05 10:25
fmardani7-Oct-05 10:25 
AnswerRe: c# 2.0 exam Pin
enjoycrack7-Oct-05 10:37
enjoycrack7-Oct-05 10:37 
QuestionStatic Method Variables Pin
tsramkumar7-Oct-05 9:27
tsramkumar7-Oct-05 9:27 
AnswerRe: Static Method Variables Pin
Daniel Grunwald7-Oct-05 9:43
Daniel Grunwald7-Oct-05 9:43 
GeneralRe: Static Method Variables Pin
tsramkumar7-Oct-05 9:44
tsramkumar7-Oct-05 9:44 
AnswerRe: Static Method Variables Pin
S. Senthil Kumar7-Oct-05 20:56
S. Senthil Kumar7-Oct-05 20:56 
GeneralRe: Static Method Variables Pin
tsramkumar8-Oct-05 17:46
tsramkumar8-Oct-05 17:46 
AnswerRe: Static Method Variables Pin
Tom Larsen8-Oct-05 9:19
Tom Larsen8-Oct-05 9:19 
QuestionInternal Rate of Return code (IRR) Pin
zaboboa7-Oct-05 9:07
zaboboa7-Oct-05 9:07 
AnswerRe: Internal Rate of Return code (IRR) Pin
leppie7-Oct-05 11:21
leppie7-Oct-05 11:21 
GeneralRe: Internal Rate of Return code (IRR) Pin
zaboboa11-Oct-05 3:01
zaboboa11-Oct-05 3:01 
QuestionDataGridView + DoubleClick + Close = Exception? Pin
Anonymous7-Oct-05 8:00
Anonymous7-Oct-05 8:00 
AnswerRe: DataGridView + DoubleClick + Close = Exception? Pin
XRaheemX7-Oct-05 8:18
XRaheemX7-Oct-05 8:18 
GeneralRe: DataGridView + DoubleClick + Close = Exception? Pin
Anonymous7-Oct-05 8:19
Anonymous7-Oct-05 8:19 
GeneralRe: DataGridView + DoubleClick + Close = Exception? Pin
XRaheemX7-Oct-05 8:24
XRaheemX7-Oct-05 8:24 
Ahh I see... I have 2005 Beta 2 but am not willing to install it in my work environment. Until I get build a test env, I cannot provide any good help to ya.

Try these two methods though.

1.) Create a timer set to 100ms and have the timer_elasped event close the form. and start the timer inside your douleclick method. This would allow the method to complete and then run the close time. This is not a good way to do it, but probably the easiest.

2.) Create an event delegate to close the form. Inside the code for the control_click call the method this.Invoke(new delegatename(delegatemethod)); Then in the delegatemethod() call this.close; This is the thread safe way to run form methods on a click. Hit me back if you need realcode examples and I'll make some for ya


GeneralRe: DataGridView + DoubleClick + Close = Exception? Pin
Anonymous7-Oct-05 9:09
Anonymous7-Oct-05 9:09 
GeneralRe: DataGridView + DoubleClick + Close = Exception? Pin
Anonymous11-Oct-05 5:26
Anonymous11-Oct-05 5:26 
QuestionDialog opening behavior on a dual monitor system Pin
Dan Neely7-Oct-05 7:40
Dan Neely7-Oct-05 7:40 
AnswerRe: Dialog opening behavior on a dual monitor system Pin
XRaheemX7-Oct-05 7:44
XRaheemX7-Oct-05 7:44 
GeneralRe: Dialog opening behavior on a dual monitor system Pin
Dan Neely7-Oct-05 8:00
Dan Neely7-Oct-05 8:00 
GeneralRe: Dialog opening behavior on a dual monitor system Pin
XRaheemX7-Oct-05 8:05
XRaheemX7-Oct-05 8:05 
GeneralRe: Dialog opening behavior on a dual monitor system Pin
Dan Neely7-Oct-05 8:44
Dan Neely7-Oct-05 8:44 

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.