Click here to Skip to main content
15,886,919 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to create Data recovery application using c#.net windows form Pin
Dave Kreskowiak13-Nov-14 18:32
mveDave Kreskowiak13-Nov-14 18:32 
RantRe: How to create Data recovery application using c#.net windows form Pin
Richard Deeming14-Nov-14 2:15
mveRichard Deeming14-Nov-14 2:15 
QuestionPlug in for Gecko Browser Window to view a PDF? Pin
PDTUM13-Nov-14 7:54
PDTUM13-Nov-14 7:54 
QuestionHow to handle recording method in main form? Pin
Member 1110634813-Nov-14 4:37
Member 1110634813-Nov-14 4:37 
AnswerRe: How to handle recording method in main form? Pin
Eddy Vluggen13-Nov-14 5:39
professionalEddy Vluggen13-Nov-14 5:39 
GeneralRe: How to handle recording method in main form? Pin
BillWoodruff13-Nov-14 6:22
professionalBillWoodruff13-Nov-14 6:22 
GeneralRe: How to handle recording method in main form? Pin
Eddy Vluggen13-Nov-14 7:14
professionalEddy Vluggen13-Nov-14 7:14 
AnswerRe: How to handle recording method in main form? Pin
BillWoodruff13-Nov-14 6:21
professionalBillWoodruff13-Nov-14 6:21 
There are several "red flags" in my head looking at your code:

1. you create instances of 'MainForm in both the EventHandlers, and those are assigned to local variables ('dlg): that means the references to those instances are effectively discarded the moment the EventHandler code is finished executing.

So, the instance of 'MainForm created in the first EventHandler has no relationship to the instance of MainForm created in the second EventHandler.

2. similarly 'recWorker is created, and the reference to it will be discarded.

3. there's so much one can't know looking at this code:

a. what code is in the 'StartRec and 'StopRec methods in 'MainForm.

b. we don't know in what context (Form, Class) these two EventHandlers are defined.

An obvious change to try is:

1. create one instance of MainForm and keep a reference to it.

2. create one instance of 'recWorker and keep a reference to it.

Suggestions:

1. might as well set the Enabled property of the recording Button to 'false when it gets a click: if it's not enabled it will never get a click.

2. set the Enabled property of the recording Button to 'true when you recording terminates

3. what about disabling the stop Button initially, and when recording is terminated.
«At the still point of the turning world. Neither flesh nor fleshless;
Neither from nor towards; at the still point, there the dance is
...
Neither ascent nor decline. Except for the point, the still point,
There would be no dance, and there is only the dance
»

T.S. Elliot, The Four Quartets: "Burnt Norton"
/xml>

GeneralRe: How to handle recording method in main form? Pin
Member 1110634813-Nov-14 21:16
Member 1110634813-Nov-14 21:16 
AnswerRe: How to handle recording method in main form? Pin
Bernhard Hiller13-Nov-14 20:48
Bernhard Hiller13-Nov-14 20:48 
QuestionSending E mail using C# Pin
Fraol Gelana13-Nov-14 3:19
Fraol Gelana13-Nov-14 3:19 
SuggestionRe: Sending E mail using C# Pin
Richard Deeming13-Nov-14 3:26
mveRichard Deeming13-Nov-14 3:26 
GeneralRe: Sending E mail using C# Pin
Fraol Gelana13-Nov-14 3:41
Fraol Gelana13-Nov-14 3:41 
GeneralRe: Sending E mail using C# Pin
Richard Deeming13-Nov-14 3:55
mveRichard Deeming13-Nov-14 3:55 
AnswerRe: Sending E mail using C# Pin
Richard Deeming13-Nov-14 3:29
mveRichard Deeming13-Nov-14 3:29 
AnswerRe: Sending E mail using C# Pin
BillWoodruff13-Nov-14 3:37
professionalBillWoodruff13-Nov-14 3:37 
GeneralRe: Sending E mail using C# Pin
jschell13-Nov-14 11:27
jschell13-Nov-14 11:27 
AnswerRe: Sending E mail using C# Pin
Marco Bertschi13-Nov-14 23:01
protectorMarco Bertschi13-Nov-14 23:01 
QuestionHow To Create Data Recovery in C#.net Pin
Srikanth5913-Nov-14 1:51
Srikanth5913-Nov-14 1:51 
AnswerRe: How To Create Data Recovery in C#.net Pin
Dave Kreskowiak13-Nov-14 2:08
mveDave Kreskowiak13-Nov-14 2:08 
QuestionPDFSHARP - table page break Pin
Mol4ok12-Nov-14 22:19
Mol4ok12-Nov-14 22:19 
AnswerRe: PDFSHARP - table page break Pin
Mol4ok16-Nov-14 15:57
Mol4ok16-Nov-14 15:57 
GeneralRe: PDFSHARP - table page break Pin
Mycroft Holmes16-Nov-14 18:32
professionalMycroft Holmes16-Nov-14 18:32 
GeneralRe: PDFSHARP - table page break Pin
Mol4ok16-Nov-14 21:03
Mol4ok16-Nov-14 21:03 
QuestionCannot access a disposed object. Object name : System.Net.Mail.MailMessage Pin
Jassim Rahma12-Nov-14 20:35
Jassim Rahma12-Nov-14 20:35 

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.