|
Do you mean like this?
private System.Timers.Timer timerStatus = new System.Timers.Timer(200);
Initialize()
{
_backgroundWorker = new BackgroundWorker();
_backgroundWorker.WorkerSupportsCancellation = true;
_backgroundWorker.WorkerReportsProgress = true;
_backgroundWorker.DoWork += new DoWorkEventHandler(BackgroundWorker_DoWork);
_backgroundWorker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(_backgroundWorker_RunWorkerCompleted);
timerStatus.Elapsed += new System.Timers.ElapsedEventHandler(OnElapsedTimeStatus);
timerStatus.Enabled = true;
}
private void OnElapsedTimeStatus(object source, System.Timers.ElapsedEventArgs e)
{
_backgroundWorker.RunWorkerAsync();
}
private void BackgroundWorker_DoWork(object sender, DoWorkEventArgs e)
{
if (_backgroundWorker.CancellationPending)
{
e.Cancel = true;
return;
}
MonitorStatus();
}
|
|
|
|
|
Yes - that's what I mean.
|
|
|
|
|
I think I have it working now but I will continue to debug and test...
Is it ok, to use a while loop instead of a timer?
|
|
|
|
|
I would not recommend it. You might get away with it if the while loop was running in it's own separate thread.
|
|
|
|
|
|
Hello everyone,
A lot of examples that are given in this type of problem but i didnt found the working solution.
My problem is to create an ASPX page that will capture an image from a webcam.
I know there its hard to find simple solution but i'l be asking f someone can provide me one simplified
solution regarding this problem..
im no expert in writing a web page thing.
thank you in advance.
xxx
|
|
|
|
|
|
I already registered the Dll but it gives me an error.. May i know how i solve it..
"Retrieving the COM class factory for component with CLSID {D6BA1539-8473-497C-92C3-8ECF63DAC0F3} failed due to the following error: 80040154."
tnx.
xxx
|
|
|
|
|
Did you register the DLL in your system?
I must get a clever new signature for 2011.
|
|
|
|
|
yes i did...
now i have another error... "ERROR GrabFrame()
//Jpeg compression quality
short nQuality = 45;
//Shout a picture from my webcam
CAMSERVERLib.Camera cam = new CAMSERVERLib.CameraClass();
byte[] picture = (byte[])cam.GrabFrame(nQuality); ---> "ERROR GrabFrame().
//Add the hour to the jpeg picture
MemoryStream ms = new MemoryStream( picture );
Bitmap bmp = new Bitmap( ms );
xxx
|
|
|
|
|
The_Collector wrote: now i have another error... "ERROR GrabFrame()
What error?
I must get a clever new signature for 2011.
|
|
|
|
|
the words in BOLD is d ERRROR... "ERROR GrabFrame()"
xxx
|
|
|
|
|
the words in BOLD is d ERRROR... "ERROR GrabFrame()"
xxx
|
|
|
|
|
Well that makes it so much clearer.
I must get a clever new signature for 2011.
|
|
|
|
|
i dont understand...
but anyway, thanks for your effort....
just want to have a clearer answer on this things...
xxx
|
|
|
|
|
The_Collector wrote: i dont understand...
Nor do I, all you have said is "the words in BOLD is d ERRROR... "ERROR GrabFrame()"", which tells us nothing. What error, what messages, what status codes, what exceptions, etc? People reading this cannot guess what happens on your system.
I must get a clever new signature for 2011.
|
|
|
|
|
its a camserver.dll which doesn't give any error numbers or description, just this error....
xxx
|
|
|
|
|
So how exactly do you think anyone can guess what the problem is? I suggest you go to the site or supplier of the DLL and ask them for more information.
I must get a clever new signature for 2011.
|
|
|
|
|
i guess so... i'l try to reach d programmer of this dll or look for another dll..
thanks.
xxx
|
|
|
|
|
In addition tp pravin answer I also suggest you to go there[^] to download a sample application to learn how to capture image using webcam.
|
|
|
|
|
this is a windows application,,, Im looking for ASPX page.
thank you
xxx
|
|
|
|
|
Simple .NET licensing mechanism - how to crack this (assuming exe is obfuscated?)
<br />
class Program<br />
{<br />
static void Main(string[] args)<br />
{<br />
string EncryptedLicense = System.IO.File.ReadAllText("License.txt");<br />
if (LicenseManager.Decrypt(EncryptedLicense))
{<br />
Console.WriteLine("Valid license");<br />
}<br />
else<br />
{<br />
Console.WriteLine("Invalid license");<br />
}<br />
...<br />
}<br />
}<br />
dev
modified on Thursday, March 10, 2011 10:21 PM
|
|
|
|
|
Make a copy of License.txt?
--edit--
A link to the previous[^] thread would have helped. As is now, it looks like you're trying to breach someone else's protection.
I are Troll
|
|
|
|
|
lets assume license file is encrypted + contains machine IP address or MAC code with expiration date.
But where'd you store the private decryption key?
dev
|
|
|
|
|
By paying for a license. License mechanisms exist for a reason.
|
|
|
|