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

C#

 
GeneralRe: how to add numbers to form with specified position Pin
Luc Pattyn13-May-09 13:20
sitebuilderLuc Pattyn13-May-09 13:20 
AnswerRe: how to add numbers to form with specified position Pin
Henry Minute13-May-09 14:42
Henry Minute13-May-09 14:42 
QuestionHow to stop an Event Pin
Payam Rastogi13-May-09 10:11
Payam Rastogi13-May-09 10:11 
AnswerRe: How to stop an Event Pin
Dave Kreskowiak13-May-09 10:47
mveDave Kreskowiak13-May-09 10:47 
GeneralRe: How to stop an Event Pin
PIEBALDconsult13-May-09 14:59
mvePIEBALDconsult13-May-09 14:59 
GeneralRe: How to stop an Event Pin
Luc Pattyn13-May-09 15:39
sitebuilderLuc Pattyn13-May-09 15:39 
GeneralRe: How to stop an Event Pin
Dave Kreskowiak13-May-09 19:12
mveDave Kreskowiak13-May-09 19:12 
GeneralRe: How to stop an Event Pin
Payam Rastogi14-May-09 11:05
Payam Rastogi14-May-09 11:05 
Hi,
Thanks for your reply
I used this code but it is still showing error highlighting fThread.Interrupt() ---Object reference not set to an instance of an object.Now what changes should I do in order to make this code work

[code]
private void frameExtract()//function to extract frames
{
string outPath = txtExtBitmap.Text;
System.IO.Directory.CreateDirectory(outPath);

if (fg != null)
{
foreach (FrameGrabber.Frame f in fg)
{
using (f)
{
picBoxFrame.Image = (Bitmap)f.Image.Clone();
f.Image.Save(System.IO.Path.Combine(outPath, "frame" + f.FrameIndex + ".bmp"), System.Drawing.Imaging.ImageFormat.Bmp);
Application.DoEvents();
}

if (fg == null)
{
return;
}
}
}
}

public void ThreadProc()
{
try
{
MethodInvoker mi = new MethodInvoker(this.frameExtract);
this.BeginInvoke(mi);
}
catch (ThreadInterruptedException e)
{
Console.WriteLine("Interruption",e);
}
catch (Exception we)
{
Console.WriteLine("Exceptiom",we);
}
}

private void button43_Click(object sender, EventArgs e)//Extract button
{
fThread = new Thread(new ThreadStart(ThreadProc));
fThread.IsBackground = true;
fThread.Start();
}

private void button44_Click(object sender, EventArgs e)//Stop Button
{
fThread.Interrupt();
fThread = null;
}
[\code]
GeneralRe: How to stop an Event Pin
Dave Kreskowiak14-May-09 17:54
mveDave Kreskowiak14-May-09 17:54 
AnswerRe: How to stop an Event Pin
DaveyM6913-May-09 10:51
professionalDaveyM6913-May-09 10:51 
QuestionSimple Interest Problem Pin
ctreed72813-May-09 10:05
ctreed72813-May-09 10:05 
AnswerRe: Simple Interest Problem Pin
Luc Pattyn13-May-09 10:12
sitebuilderLuc Pattyn13-May-09 10:12 
AnswerRe: Simple Interest Problem Pin
Christian Graus13-May-09 11:20
protectorChristian Graus13-May-09 11:20 
QuestionForce CG Pin
Jammer13-May-09 9:43
Jammer13-May-09 9:43 
AnswerRe: Force CG Pin
Dave Kreskowiak13-May-09 9:55
mveDave Kreskowiak13-May-09 9:55 
GeneralRe: Force CG Pin
Jammer13-May-09 10:12
Jammer13-May-09 10:12 
GeneralRe: Force CG Pin
Dave Kreskowiak13-May-09 10:44
mveDave Kreskowiak13-May-09 10:44 
GeneralRe: Force CG Pin
Jammer13-May-09 10:49
Jammer13-May-09 10:49 
GeneralRe: Force CG Pin
Christian Graus13-May-09 11:18
protectorChristian Graus13-May-09 11:18 
GeneralRe: Force CG Pin
Dave Kreskowiak13-May-09 14:24
mveDave Kreskowiak13-May-09 14:24 
AnswerRe: Force CG Pin
Christian Graus13-May-09 11:15
protectorChristian Graus13-May-09 11:15 
GeneralRe: Force CG Pin
Jammer13-May-09 11:23
Jammer13-May-09 11:23 
GeneralRe: Force CG Pin
Christian Graus13-May-09 11:25
protectorChristian Graus13-May-09 11:25 
GeneralRe: Force CG Pin
Jammer13-May-09 11:41
Jammer13-May-09 11:41 
Questionhow to retrieve seconds, minutes and hours out of timer Pin
Aljaz11113-May-09 9:39
Aljaz11113-May-09 9:39 

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.