Sockets

Using localhost 127.0.0.1 sockets to communicate works when you debug, but when you go to install your UWP app its blocked! UDP sockets UDP isn’t permitted from UWP app to UWP app (stated here – “The UDP protocol is not supported”.) In our testing, UDP client is possible, if you use the telerik AppContainer Loopback […]

Read More

.Threads

Creating a background thread Creating an accurate timer based looping background thread See here.

Read More

Stopwatch

Stopatch is an accurate timeout timer, but it doesn’t Generate Events The stopwatch timer accurately measures elapsed time.If the PC supports a high-resolution performance counter, then the Stopwatch class uses that counter to measure elapsed time. Otherwise it uses the system timer. Use the Frequency and IsHighResolution fields to determine the precision and resolution if […]

Read More

Remote Debugging

It appears remove debugging for a standard app in Visual Studio isn’t easy like it is for a UWP app You need to copy the built exe to the remote computer every time you build the project. You can automate this by creating a post-build event in which you can do practically everything (you can […]

Read More

Drawing a chart using PictureBox

You can create simple charts by simply drawing lines and points. There’s an example of this used in this application: https://ftdichip.com/wp-content/uploads/2022/02/LibFT260-v1.1.5.zip

Read More

Conditional compilation

Because C# doesn’t use define directives like other platforms you don’t get the same compile time options based on platform target etc. The simple solution is to set a “Conditional compilation symbol” as follows In Project properties > Build Select the platform you want to detect . In “Conditional compilation symbols”, add a new symbol […]

Read More

Debugging on a remote Windows PC

Resources https://docs.microsoft.com/en-us/windows/uwp/debug-test-perf/deploying-and-debugging-uwp-apps Setting up debugging on a remote Windows PC Settings > For Developers > Turn on “Developer mode” Install the “Remote Tools for Visual Studio” on the target PC Then run Visual Studio > Remote Debugger Configuration Wizzard Follow the prompts to set the remote debugger to run. Then run Visual Studio > Remote […]

Read More