Click here to Skip to main content
15,887,477 members
Home / Discussions / C#
   

C#

 
QuestionHow to integrate Facebook marketing API in window application using c# Pin
Member 1063574713-Oct-16 3:11
Member 1063574713-Oct-16 3:11 
AnswerRe: How to integrate Facebook marketing API in window application using c# Pin
Eddy Vluggen13-Oct-16 3:38
professionalEddy Vluggen13-Oct-16 3:38 
QuestionHTMLtoPDF Downloader Pin
Member 1279065812-Oct-16 18:29
Member 1279065812-Oct-16 18:29 
AnswerRe: HTMLtoPDF Downloader Pin
Member 1279065812-Oct-16 18:41
Member 1279065812-Oct-16 18:41 
AnswerRe: HTMLtoPDF Downloader Pin
Nathan Minier13-Oct-16 3:13
professionalNathan Minier13-Oct-16 3:13 
AnswerRe: HTMLtoPDF Downloader Pin
yellow flower18-Oct-16 1:39
yellow flower18-Oct-16 1:39 
QuestionC# Stopwatch - DateTime And Timer Tick - Is there a better way to run the Stopwatch Pin
Member 1275660312-Oct-16 12:05
Member 1275660312-Oct-16 12:05 
AnswerRe: C# Stopwatch - DateTime And Timer Tick - Is there a better way to run the Stopwatch Pin
Midi_Mick12-Oct-16 19:05
professionalMidi_Mick12-Oct-16 19:05 
This very much depends on the application and level of accuracy required. Your sample provides the simplest solution, but it lacks a degree of accuracy, as everything is processed on the UI thread. Using this system, a timer event is actually placed on the message queue when it is signalled, and thus needs to wait its turn to be processed. This can cause a delay small in the processing of the tick, which over time, may accumulate.

To go to the next level of accuracy, you need to look at a System.Threading.Timer[^]. These fire events off in another thread, so there is no queue delays. It does, however, take a bit of effort to marshal the results back to the UI thread to update your controls.

The most accurate timer is the High Resolution Timer used in the Stopwatch Class[^]. This does not fire its own events at all, so you need to monitor its values in a separate thread, fire the periodic events in another thread, and then marshal all the results back to the UI for display.

All three options are good fun!
Cheers,

Mick
------------------------------------------------
It doesn't matter how often or hard you fall on your arse, eventually you'll roll over and land on your feet.

AnswerRe: C# Stopwatch - DateTime And Timer Tick - Is there a better way to run the Stopwatch Pin
OriginalGriff12-Oct-16 22:47
mveOriginalGriff12-Oct-16 22:47 
AnswerRe: C# Stopwatch - DateTime And Timer Tick - Is there a better way to run the Stopwatch Pin
Bernhard Hiller13-Oct-16 22:08
Bernhard Hiller13-Oct-16 22:08 
AnswerRe: C# Stopwatch - DateTime And Timer Tick - Is there a better way to run the Stopwatch Pin
omeecode15-Oct-16 8:56
omeecode15-Oct-16 8:56 
QuestionHTML.Kendo.ComboBox [Error: Object doesn't support property or method 'requestData'] Pin
Atul Shriram rane11-Oct-16 17:57
Atul Shriram rane11-Oct-16 17:57 
AnswerRe: HTML.Kendo.ComboBox [Error: Object doesn't support property or method 'requestData'] Pin
NotPolitcallyCorrect12-Oct-16 4:53
NotPolitcallyCorrect12-Oct-16 4:53 
GeneralRe: HTML.Kendo.ComboBox [Error: Object doesn't support property or method 'requestData'] Pin
Pete O'Hanlon12-Oct-16 4:59
mvePete O'Hanlon12-Oct-16 4:59 
GeneralRe: HTML.Kendo.ComboBox [Error: Object doesn't support property or method 'requestData'] Pin
NotPolitcallyCorrect12-Oct-16 5:47
NotPolitcallyCorrect12-Oct-16 5:47 
QuestionI have a search button and datagrid in c# and SQL Pin
antonio_dsanchez11-Oct-16 11:16
antonio_dsanchez11-Oct-16 11:16 
AnswerRe: I have a search button and datagrid in c# and SQL Pin
Dave Kreskowiak11-Oct-16 11:23
mveDave Kreskowiak11-Oct-16 11:23 
AnswerRe: I have a search button and datagrid in c# and SQL Pin
antonio_dsanchez11-Oct-16 11:31
antonio_dsanchez11-Oct-16 11:31 
GeneralRe: I have a search button and datagrid in c# and SQL Pin
Swinkaran11-Oct-16 16:00
professionalSwinkaran11-Oct-16 16:00 
GeneralRe: I have a search button and datagrid in c# and SQL Pin
Pete O'Hanlon11-Oct-16 20:35
mvePete O'Hanlon11-Oct-16 20:35 
QuestionClosest standard value Pin
Pavlex410-Oct-16 10:44
Pavlex410-Oct-16 10:44 
AnswerRe: Closest standard value Pin
Pete O'Hanlon10-Oct-16 19:31
mvePete O'Hanlon10-Oct-16 19:31 
GeneralRe: Closest standard value Pin
Pavlex410-Oct-16 23:38
Pavlex410-Oct-16 23:38 
Rant[REPOST] Closest standard value Pin
Richard Deeming11-Oct-16 2:14
mveRichard Deeming11-Oct-16 2:14 
AnswerRe: Closest standard value Pin
Ralf Meier11-Oct-16 21:02
mveRalf Meier11-Oct-16 21:02 

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.