Click here to Skip to main content
15,883,864 members
Home / Discussions / C#
   

C#

 
QuestionClosing a User Control from itself Pin
caksabre215-Feb-09 22:29
caksabre215-Feb-09 22:29 
AnswerRe: Closing a User Control from itself Pin
Calin Tatar15-Feb-09 22:40
Calin Tatar15-Feb-09 22:40 
AnswerRe: Closing a User Control from itself Pin
ABitSmart15-Feb-09 22:42
ABitSmart15-Feb-09 22:42 
GeneralRe: Closing a User Control from itself Pin
caksabre215-Feb-09 23:14
caksabre215-Feb-09 23:14 
AnswerRe: Closing a User Control from itself Pin
kbalias15-Feb-09 22:51
kbalias15-Feb-09 22:51 
AnswerRe: Closing a User Control from itself Pin
Deresen15-Feb-09 22:54
Deresen15-Feb-09 22:54 
QuestionProblem with editing data via databound Textbox Pin
kbalias15-Feb-09 22:02
kbalias15-Feb-09 22:02 
QuestionThread Stop with Excel Object Pin
MumbleB15-Feb-09 21:54
MumbleB15-Feb-09 21:54 
Hi Guys. I would like to know the correct way of stopping a Thread and how I can close the current Excel workbook. In My application I am reading a text file and writing the details from there to an Excel workbook. Problem that I have is that I would like to add a "STOP" button to the application. In my stop button even I have the following code.
private void button1_Click(object sender, EventArgs e)
{

    MessageBox.Show("Process aborted by user", "Process Abort Message",
        MessageBoxButtons.OK, MessageBoxIcon.Warning);

    Thread.CurrentThread.Abort();
}

Now, I have found that Thread.CurrentThread.Abort() closses the application, Aborting it, but it doesn't close the Excel workbook that was opened by the Thread. How do I close the workbook? I suppose I need to close it in this button event but how do I do that as the Thread.CurrentThread.Abort() closses the application completely.

Excellence is doing ordinary things extraordinarily well.

AnswerRe: Thread Stop with Excel Object Pin
ABitSmart15-Feb-09 22:33
ABitSmart15-Feb-09 22:33 
QuestionGet location of Open With dialog result Pin
pedersen-roxen15-Feb-09 21:52
pedersen-roxen15-Feb-09 21:52 
QuestionMonitoring a database Pin
hadad15-Feb-09 21:16
hadad15-Feb-09 21:16 
AnswerRe: Monitoring a database Pin
Expert Coming15-Feb-09 21:55
Expert Coming15-Feb-09 21:55 
Questioncan not run OPENGL Program Pin
chandrapal15-Feb-09 21:02
chandrapal15-Feb-09 21:02 
AnswerRe: can not run OPENGL Program Pin
Expert Coming15-Feb-09 21:08
Expert Coming15-Feb-09 21:08 
AnswerRe: can not run OPENGL Program Pin
Nuri Ismail15-Feb-09 21:50
Nuri Ismail15-Feb-09 21:50 
Questiondifferent Behaviour of controls according to login Pin
AlokZanwar15-Feb-09 21:01
AlokZanwar15-Feb-09 21:01 
AnswerRe: different Behaviour of controls according to login Pin
Expert Coming15-Feb-09 21:09
Expert Coming15-Feb-09 21:09 
AnswerRe: different Behaviour of controls according to login Pin
Nuri Ismail15-Feb-09 21:43
Nuri Ismail15-Feb-09 21:43 
GeneralRe: different Behaviour of controls according to login Pin
Expert Coming15-Feb-09 21:57
Expert Coming15-Feb-09 21:57 
AnswerRe: different Behaviour of controls according to login Pin
MumbleB15-Feb-09 22:08
MumbleB15-Feb-09 22:08 
AnswerRe: different Behaviour of controls according to login Pin
arun_pk15-Feb-09 23:24
arun_pk15-Feb-09 23:24 
QuestionC# :: Updating SQL Table Form DataGridView Pin
WinSolution15-Feb-09 21:00
WinSolution15-Feb-09 21:00 
QuestionHow to show a selected treeview node' s attribute & value in listbox using C#? [modified] Pin
rasingh115-Feb-09 20:57
rasingh115-Feb-09 20:57 
QuestionHow to Debug C# Class Library that is invoked by an external Application? Pin
undecypherable15-Feb-09 19:45
undecypherable15-Feb-09 19:45 
AnswerRe: How to Debug C# Class Library that is invoked by an external Application? Pin
pedersen-roxen17-Feb-09 21:07
pedersen-roxen17-Feb-09 21: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.