|
<br />
System.Diagnostics.Stopwatch timer = new System.Diagnostics.Stopwatch() ;<br />
<br />
timer.Reset() ;
timer.Start() ;<br />
<br />
<br />
timer.Stop() ;<br />
<br />
|
|
|
|
|
|
I find it easier to use.
But read the documentation. It has greater precision which may not be important in this case, but maybe down the line you'll find you need it.
|
|
|
|
|
Cool, thanks PIEBALDconsult!
regards,
George
|
|
|
|
|
Is it possible to somehow draw text on an image with an inverted color? I basically want to make a small timestamp that always shows up, and I don't want to resort to putting it in a colored rectangle if I can avoid it.
I've got access to framework 3.5 if that helps.
|
|
|
|
|
Im not entirely certain that would be very readable either, with the changing colour and whatnot. What about an outline around the text?
EDIT: But, if you want inverted text, then how about:
ImageOne - original image
ImageTwo - empty image with same dimensions as ImageOne, white background
ImageThree - Duplicate of ImageOne
Step one:
Draw Text to ImageTwo in black
Step two:
Invert the colour of ImageThree
Step three:
Read the colour of each pixel in ImageTwo.
If the colour is WHITE, then set the same pixel in ImageThree to bright pink or something (255,0,255)
Step four:
Set the transparency key of ImageThree to the same colour as before (in this case, [255,0,255])
Step five:
Draw ImageThree on to ImageOne
My current favourite word is: Bacon!
-SK Genius
modified on Saturday, April 12, 2008 11:02 AM
|
|
|
|
|
I have a web browser control in my program, and I'm change its url property to different urls, via a foreach loop.
Now, the problem is, that the "Document Loaded" event only fires for the last url in the list, and the only page you eventually see is the last, what i want is kind of a slide-show effect.
is there any way to force the control to pause the loop and fire the event for each of the urls in my collection?
|
|
|
|
|
Instead of using a for loop, why not use a timer with an interval of <insert time you want each page to be displayed here> and change the url on each pass through, you could do something like:
Timer()
{
static int counter = 0;
switch(counter) {
case 0:
navigate to url
break;
case 1:
navigate to url
break;
case 2:
navigate to url
break;
case 3:
navigate to url
break;
default:
counter = 0;
myTimer.Stop();
break;
}
counter++;
}
My current favourite word is: Bacon!
-SK Genius
|
|
|
|
|
this might work, but if some site takes extremly long to load (or longer than usual) then the slideshow might miss a website, or show it for too long/too little.
what i want is for the browser to sort of pause the thread, untill the website hes showing is loaded completly, is this possible?
|
|
|
|
|
Okay then, how about using the DocumentCompleted event:
DocumentCompleted()
{
myTimer.Start();
}
Timer()
{
static int counter = 0;
switch(counter) {
case 0:
navigate to url
break;
case 1:
navigate to url
break;
case 2:
navigate to url
break;
case 3:
navigate to url
break;
default:
counter = 0;
break;
}
counter++;
myTimer.Stop();
}
That way, the set amout of time will pass, then the page will change and the timer will stop. Once the page is loaded the timer will start again. After the set amount of time passes again it will navigate to the new page then stop the timer... and so on.
My current favourite word is: Bacon!
-SK Genius
|
|
|
|
|
|
Good Day,
I've been searching for it in Google for like 2 hours but can't hit the proper keyword.
I have a Windows Form with a Listbox on it. When I drag a file from the desktop inside the Windows form, I want to have the path of the file added to the listbox.
Is there an article or a guide on how to accomplish such feat?
Thanks!
|
|
|
|
|
|
|
I do my project(softphone) with code "AsteriskIAXClientWrapper" and i have a problem when i compile my project for connexion to my server Asterisk one exception ( that is : "ConfigurationErrorsException was Unhaldled" )figure in this line : "return ((int)(this["ConfigStatus"])) "
we can help me?
Thank you
|
|
|
|
|
What is AsteriskIAXClientWrapper ? If it's an article, ask the author ? If it's a third party library, ask the vendor. Odds are, none of us know what you're talking about.
But, it looks to me like you have a missing entry in your config file.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Thank you for your reponse
AsteriskIAXClientWrapper is a project " Asterisk IAXClient library in C#"
|
|
|
|
|
asma_pfe wrote: Asterisk IAXClient library in C#
There is an article here in CP which explains about writing wrapper for IAX client. Try posting this question there.
|
|
|
|
|
|
Hello.
Friends,
I am trying to add Web reference in windows application but problem is that in place of web reference .NET 3.5 showing Service reference. and tell how to use.
Thanks,
RPSingh
RPSingh
|
|
|
|
|
Does the reference work, or not ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
How can I use activex control in C# application programatically without dropping it on the form?
Thanks,
Sushma
|
|
|
|
|
I don't know how you'd do that, because the way it usually works is, your code generates a proxy class that handles the COM stuff. Why can't you add a reference ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Thanks, I have posted this question after searching in the google and I am still searching.
I have tried adding in the toolbox and then dropping it on the form. I have tried using Add a Referrence method it does not work.. I get an Catastrophic failure exception.
|
|
|
|
|
Hi
When i encrypt a text file using .Net rijndael encryption the size of the text file increases. I really don't want that the size of the file increasses because the whole application works over the size of the file. User will not be aware of the fact that whatever size he will enter would increase and thus could fail the application to work.
Or may be if some one knows that it increases the size by any certain size then i might sort this out by keeping some space for encrypted file in advance and giving user the detail of the size of the file after encryption.
Any suggestion to deal with this situation.
ta
|
|
|
|