A 47.53″ OLED monitor…
https://www.aorus.com/en-gb/monitors/AORUS-FO48U or https://www.gigabyte.com/Monitor/AORUS-FO48U
![]() |
EskeRahnVarious tech stuff ………. |
I got a new Yoga X1 gen 6 20XY, delivered monday, replacing this 5y old gen 1 20FQ
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) { var OldFont = Font; Font = new Font(OldFont.FontFamily, 11f * scaleFactorX, OldFont.Style, GraphicsUnit.Pixel); OldFont.Dispose(); } 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”
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”
Some claim that you need a third party tool to have a TreeView vith multi-line text (outside WPS).
But it is actually rather easy to do with a few additional steps with the standard TreeView.
Continue reading “Windows TreeView with e.g. multi-line tree content”
Here Is a small guide in Disqus-formatting, that I have ‘published’ several times on the old GSMArena.com blog (with tiny variation).
UPDATE: Should in 2019 finally be more or less obsolete for wide enough windows!
Fast charging of batteries is very convenient, but comes at a price on the overall battery life.
Especially wireless fast charging has bad consequences!!
Continue reading “Fast charging batteries, the good and the bad.”
It is nice when people try to think in new ways, but do they have to try to ram it down our throats?
It looks like they did not even bother to test it on large monitors…
(It is this post: https://eskerahn.dk/?p=23 , note the side by side images )
Continue reading “WordPress 5.0, Gutenberg rammed down our throats”
If you run a command like this it works fine to any remote machine
schtasks.exe /query /s SomePC /U MyAccount /P XXXXX
If you try to let it point back to your own machine you get an error-message
ERROR: User credentials are not allowed on the local machine.
BUT this is actually FALSE!!! I found a workaround though..
Continue reading “Windows oddity: Schtasks.exe falsely reported error. Workaround.”
I have noticed they made a design change to Win10
About a year ago I made a post on windows scaling
So I tried to see if they have fixed stuff the past year – and NO it is actually worse now…
It took me quite some digging to find a clean way to set the standard default volume without external libs. So here the result.
If you do not want the console output, remove the writeline, and change the project from Console to Windows App.
I suggest using it as a Scheduled Task triggered by connect to user session and/or similar.
It is composed of a couple of bits and pieces combined/reduced primarily from these three.
https://stackoverflow.com/questions/31928429
https://stackoverflow.com/questions/36625576
https://social.msdn.microsoft.com/Forums/expression/en-US/90c6405d-44f6-48ce-82aa-c48a9b09dfb4
using System; using System.Runtime.InteropServices; namespace SetAudioLevel { class Program { [ComImport] [Guid("A95664D2-9614-4F35-A746-DE8DB63617E6"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] private interface IMMDeviceEnumerator { void _VtblGap1_1(); int GetDefaultAudioEndpoint(int dataFlow, int role, out IMMDevice ppDevice); } private static class MMDeviceEnumeratorFactory { public static IMMDeviceEnumerator CreateInstance() { return (IMMDeviceEnumerator)Activator.CreateInstance(Type.GetTypeFromCLSID(new Guid("BCDE0395-E52F-467C-8E3D-C4579291692E"))); // a MMDeviceEnumerator } } [Guid("D666063F-1587-4E43-81F1-B948E807363F"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] private interface IMMDevice { int Activate([MarshalAs(UnmanagedType.LPStruct)] Guid iid, int dwClsCtx, IntPtr pActivationParams, [MarshalAs(UnmanagedType.IUnknown)] out object ppInterface); } [Guid("5CDF2C82-841E-4546-9722-0CF74078229A"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IAudioEndpointVolume { //virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE RegisterControlChangeNotify(/* [in] */__in IAudioEndpointVolumeCallback *pNotify) = 0; int RegisterControlChangeNotify(IntPtr pNotify); //virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE UnregisterControlChangeNotify(/* [in] */ __in IAudioEndpointVolumeCallback *pNotify) = 0; int UnregisterControlChangeNotify(IntPtr pNotify); //virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetChannelCount(/* [out] */ __out UINT *pnChannelCount) = 0; int GetChannelCount(ref uint pnChannelCount); //virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetMasterVolumeLevel( /* [in] */ __in float fLevelDB,/* [unique][in] */ LPCGUID pguidEventContext) = 0; int SetMasterVolumeLevel(float fLevelDB, Guid pguidEventContext); //virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetMasterVolumeLevelScalar( /* [in] */ __in float fLevel,/* [unique][in] */ LPCGUID pguidEventContext) = 0; int SetMasterVolumeLevelScalar(float fLevel, Guid pguidEventContext); //virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetMasterVolumeLevel(/* [out] */ __out float *pfLevelDB) = 0; int GetMasterVolumeLevel(ref float pfLevelDB); //virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetMasterVolumeLevelScalar( /* [out] */ __out float *pfLevel) = 0; int GetMasterVolumeLevelScalar(ref float pfLevel); } static void Main(string[] args) { int Level = 20; if (args.Length == 1) { int.TryParse(args[0], out Level); } try { IMMDeviceEnumerator deviceEnumerator = MMDeviceEnumeratorFactory.CreateInstance(); IMMDevice speakers; const int eRender = 0; const int eMultimedia = 1; deviceEnumerator.GetDefaultAudioEndpoint(eRender, eMultimedia, out speakers); object aepv_obj; speakers.Activate(typeof(IAudioEndpointVolume).GUID, 0, IntPtr.Zero, out aepv_obj); IAudioEndpointVolume aepv = (IAudioEndpointVolume)aepv_obj; Guid ZeroGuid = new Guid(); int res = aepv.SetMasterVolumeLevelScalar(Level / 100f, ZeroGuid); Console.WriteLine($"Audio set for {Level}%"); //Console.Beep(); } catch (Exception ex) { Console.WriteLine($"**Could not set audio level** {ex.Message}"); } } } }
.
I stumbled upon a strange bug in what Android can report to e.g. Windows trough the MTP/WPD interface.
Under some circumstances it reports a VERY wrong file size, but if you by WPD open a stream and copy the file until it sends no more bytes, it returns the correct full content.
Continue reading “Android vs WPD bug. Wrong filesizes reported”
Many people are experiencing issues installing the cumulative update KB3213986
And there are a lot of pages on this suggesting the usual stop/rename/start stuff, but that did not do the trick on a machine I had to fiddle with.
The answer was .NET – again !!!
Continue reading “Fix for windows update issues, e.g. KB3213986”
Windows display scaling is great for programs that support it. But certainly not for all.
Especially legacy apps get blurred, so use integer only, if possible!
Continue reading “Windows display scaling blurring legacy programs”
This is an almost perfect combination of an ultrabook and a tablet in 2016. 😀
Update This post started as description of a problem with displaying some files in FireFox and Chrome, but has been transformed to a more general post about sRGB, ICC, CMS and what happens if the browser gets it wrong…
It all started when I detected that most colours in some web-files got severely distorted when displayed in FireFox and Chrome on my system. Both JPG and PNG files were affected
If you see the first one of these two squares and
substantially different from the second clear blue, your CMS system have similar issues…
The first one is supposed to be a standard blue, the second is blue LEDs on your monitor only.
Continue reading “Displaying images. Colour management, sRGB and ICC. And when something fails.”
This is a plain PhotoViewer with just TWO special function:
The ability to show more EXIF info than most and to delete or transfer matching partner files on request also, according to user defined masks.
E.g. Also handle RAW or cropped variant of a file named with predefined syntax.
Settings for position, size, splitter positions, last used folders… can be saved in users registry.
Download zip: PhotoView.Zip
This is a ‘work in progress’, so expect bugs might be present, and that things can still change quite a bit. (Last modified 2018-09-30)
Continue reading “PhotoView with Delete&Transfer of matched files, e.g. RAW”
I have made a simple test image to test the resolution of your eyes on a phone, phablet, tablet, laptop or PC!
The most common result is it is pointless to go beyond around 1/12000 of the viewing distance
Be SURE it is shown in the screens native resolution. e.g. 960 pixels should fill half a FullHD display. (or use one of the added ones with your screens resolution)
Be SURE that your browser or your windows settings doesn’t do any scaling/zooming/smoothing, i.e. one pixel in the image is one pixel on the display. (If in doubt take a magnifying glass -or macro camera- and look closely on the screen, it should be like the mock-up later in this post)
It is the point where the single line pair is indistinguishable from the double line we are looking for (that is: where it looks like one continuous thick line)
You will most likely find the finest resolution using the red or green figure.
Use any prescribed glasses that you normally would for the distance – we are testing resolution, not focusing ability.
NOTE: If you got a PenTile display, usually the green will do fine! Have a look at this on different subpixel arrangements. Several pixel arrangement exists out there, that could have similar issues…
This is an almost perfect combination of an ultrabook and a tablet. 😀
The first felling when opened is the feeling of mechanical QUALITY that can handle rough treatment. I have a strong feeling that should I drop it it is more likely to dent my floor…