Automower 435X AWD, Husqvarna, early review updated

This Automower 435X AWD is an upgrade from my 330X, See review here.

Overall: 9/10. Hardware: Fine. Software: Improved, still unfinished!

This is both a continuation of the previous Automowers and a fundamentally different approach

Updated 2020-04-29, Some stuff are fixed with newer firmware.

Continue reading “Automower 435X AWD, Husqvarna, early review updated”

Save and restore positions of windows, WindowsPosSaveNRestore

WindowsPosSaveNRestore is a tool to save the position of windows for later restore

This is primarily useful if you frequently change display configuration, say add/remove external monitor(s) e.g. by docking, or turning a device with autorotate active.

Windows also has the bug that it sometimes cram all open windows (and icons [+]) on the primary screen on sleep.

Continue reading “Save and restore positions of windows, WindowsPosSaveNRestore”

The EASY way to make a C# Windows.forms app really per monitor DPI aware

As posted in another post, many apps have problems with windows scaling.

See these screen-dumps from Windows lengthy guide that was found here

UPDATE 2020. After Windows creators update, they made things slightly more complicated, sorry…

Here is a reasonably minimalistic approach. You will often just need code like this:


    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            DPI_Per_Monitor.TryEnableDPIAware(this, SetUserFonts);
        }

        void SetUserFonts(float scaleFactorX, float scaleFactorY) {
            Font = new Font(Font.FontFamily, 11f * scaleFactorX, GraphicsUnit.Pixel);
        }
        protected override void DefWndProc(ref Message m) {
            DPI_Per_Monitor.Check_WM_DPICHANGED(SetUserFonts,m, this.Handle);
            base.DefWndProc(ref m);
        }

    }

You will need to obey a few rules, but often it can be implemented in existing code in minutes!

Continue reading “The EASY way to make a C# Windows.forms app really per monitor DPI aware”