Monthly Archives: July 2019

Here are my Stream extensions, including a c# wrapper for the ReOpenFile Windows API function, and some code that uses my CopyToStreamAsync extension method.

I don’t have many Stream extension methods, in fact there are only two, but I think they are useful. CopyToStreamAsync, an extension to Stream, is an alternative to Stream.CopyToAsync, and is featured in one of my most popular posts. ReOpen, … Continue reading

Posted in Programming | Tagged , , , , , , , , , | Leave a comment

How to pause or resume a process with c#

I wrote this post already, but the plugin I used back then formatted the code badly, so here is the subject again… The code shared today is slightly different to the original post since I have been updating my old … Continue reading

Posted in Programming | Tagged , , | Leave a comment

Resize an image in c#

Still looking through my old code as I update it for Visual Studio 2019, I found this… I have several extension methods for saving and converting images. Some of them use my async extension methods for handling streams and some … Continue reading

Posted in Programming | Tagged | Leave a comment

How to indicate the Windows display is in use (and also enable or disable the screen saver) with c#

Still going through my old code, and I found this… One part of my application is a video player, but if you’ve ever written one and used it to watch a video that’s more than a couple of minutes or … Continue reading

Posted in Programming | Tagged , , | Leave a comment

Using c# to copy, move, rename files, and delete to the recycle bin via SHFileOperation

While we’re on the subject of deleting files as in the last post, I found this old code of mine in the same solution. I don’t use it anymore because I use IFileOperation instead, but this code still works. (The … Continue reading

Posted in General, Programming | Tagged , , | Leave a comment

Some slight overkill for a method that deletes files and directories

Still cleaning up and improving my old code… I found this. It’s a method in my base class for console applications, to handle deleting files. This is something I’ve approached in different ways in different places – even in the … Continue reading

Posted in General, Programming | Tagged , | Leave a comment

Using a Folder Browser Common Dialog in c#

Lately I have been taking my old solution, which contains a large amount of my personal and experimental code, and updating it for Visual Studio 2019, since there are several wizards which help people like me who have missed all … Continue reading

Posted in Programming | Tagged , , | Leave a comment

Saving a collection of images to a high quality GIF animation using c#

I ran into an interesting problem this weekend… I was showing off a feature of my code to my son, and it didn’t work as expected… I have this application with years of my personal code, which I have recently … Continue reading

Posted in Programming | Tagged , | Leave a comment

Locating and running msbuild from the command line in Visual Studio 2019

Yesterday I installed Visual Studio 2019 Community Edition on my home machine. I went straight up from 2015 to 2019, and lo and behold, my build script, for my sample app that contains all my experimental code, no longer works. … Continue reading

Posted in Programming | Tagged | Leave a comment