Configure Outlook to always show meeting reminders on top but without stealing keyboard focus

  1. WIN+R, C:\Program Files (x86)\Microsoft Office\Office16\SELFCERT.exe
    1. Note: on some installations, it’s located instead at C:\Program Files (x86)\Microsoft Office\root\Office16\SELFCERT.exe
  2. Name=”Reminders Always On Top”, hit OK.
  3. Open Office 2016, hit ALT+F11 to open VBA window.
  4. In the tree on the left, expand ‘Microsoft Office Outlook Objects’ and double click on ‘ThisOutlookSession’
  5. Using Chrome (not Edge!) to view this page (because Edge somehow screws up the EOLs when you copy/paste *facepalm*), copy/paste the following code from here into the VBA editor:

    Private WithEvents MyReminders As Outlook.Reminders
    Private Sub Application_Startup()
        On Error Resume Next
        Set MyReminders = Outlook.Application.Reminders
    End Sub
    Private Sub MyReminders_ReminderFire(ByVal ReminderObject As Reminder)
        On Error Resume Next
        Call ActivateTimer(1)
    End Sub
    Private Sub Application_Reminder(ByVal Item As Object)
        If TypeOf Item Is AppointmentItem Then
        Call ActivateTimer(1)
        End If
    End Sub
  6. In the tree on the left, right-click in empty space and choose Insert >> Module, then double-click on ‘Module1’.
  7. Again using Chrome (not Edge!) to view this page, copy/paste the following code from here into the VBA editor:

    Option Explicit
    Private Declare Function SetTimer Lib "user32" (ByVal hWnd As LongByVal nIDEvent As Long, _
        ByVal uElapse As LongByVal lpTimerfunc As LongAs Long
    Private Declare Function KillTimer Lib "user32" (ByVal hWnd As LongByVal nIDEvent As LongAs Long
    Private Declare Function IsWindowVisible Lib "user32" (ByVal hWnd As LongAs Long
    Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName _
        As StringByVal lpWindowName As StringAs Long
    Private Declare Function ShowWindow Lib "user32" (ByVal hWnd As LongByVal nCmdSHow As LongAs Long
    Private Declare Function SetWindowPos Lib "user32" (ByVal hWnd As LongByVal hWndInsertAfter As Long, _
        ByVal As LongByVal As LongByVal cx As LongByVal cy As LongByVal wFlags As LongAs Long
    Public Declare Function GetTopWindow Lib "user32" (ByVal hWnd As LongAs Long
    Public Declare Function GetWindow Lib "user32" (ByVal hWnd As LongByVal uCmd As LongAs Long
    Private Const GW_HWNDFIRST = 0
    Private Const GW_HWNDNEXT = 2
    Private Const SWP_NOSIZE = &H1
    Private Const SWP_NOMOVE = &H2
    Private Const SWP_NOACTIVATE = &H10
    Private Const HWND_TOPMOST = -1
    Private Const HWND_TOP = 0
    Public TimerID As Long 'Need a timer ID to turn off the timer. If the timer ID <> 0 then the timer is running
    Public hRemWnd As Long 'Store the handle of the reminder window
    Public Sub ActivateTimer(ByVal Seconds As Long'The SetTimer call accepts milliseconds
        On Error Resume Next
        If TimerID <> 0 Then Call DeactivateTimer   'Check to see if timer is running before call to SetTimer
        If TimerID = 0 Then TimerID = SetTimer(0, 0, Seconds * 1000, AddressOf TriggerEvent)
    End Sub
    Public Sub DeactivateTimer()
        On Error Resume Next
        Dim Success As Long: Success = KillTimer(0, TimerID)
        If Success <> 0 Then TimerID = 0
    End Sub
    Public Sub TriggerEvent(ByVal hWnd As LongByVal uMsg As LongByVal idevent As LongByVal Systime As Long)
        Call EventFunction
    End Sub
    Public Function EventFunction()
        On Error Resume Next
        If hRemWnd = 0 Then hRemWnd = FindReminderWindow(100)
        If hRemWnd = 0 Then
            If TimerID <> 0 Then Call DeactivateTimer
            If IsWindowVisible(hRemWnd) Then
                If SetWindowPos(hRemWnd, HWND_TOPMOST, 0, 0, 0, 0, FLAGS) <> 0 Then ' Move it into the 'topmost' band
                    If SetWindowPos(hRemWnd, HWND_TOP, 0, 0, 0, 0, FLAGS) <> 0 Then ' Move it to the top of the Z-order
                        Dim hTopWnd As Long: hTopWnd = GetWindow(hRemWnd, GW_HWNDFIRST)
                        While hTopWnd <> 0 And 0 = IsWindowVisible(hTopWnd)
                            hTopWnd = GetWindow(hTopWnd, GW_HWNDNEXT)
                        ' SetWindowPos won't work while user session is locked, so we must double-check.
                        If hTopWnd = hRemWnd Then
                            If TimerID <> 0 Then Call DeactivateTimer
                        End If
                    End If
                End If
            End If
        End If
    End Function
    Public Function FindReminderWindow(iUB As IntegerAs Long
        On Error Resume Next
        Dim As Integer: i = 1
        FindReminderWindow = FindWindow(vbNullString, "1 Reminder")
        Do While i < iUB And FindReminderWindow = 0
            FindReminderWindow = FindWindow(vbNullString, i & " Reminder(s)")
            i = i + 1
    End Function
  8. Sign the Macro so it will run: Tools > Digital Signature… and choose the certificate you created earlier.
  9. Close the VBA window.
  10. Close all Outlook windows.  (If prompted to save the VBA project, choose to save it.)
  11. Relaunch Outlook.
  12. You should get a modal security dialog for the new VBA script you wrote.  Click “Trust all documents from this publisher”.  This is a one-time process (you should never need to do this step again).
Posted in Uncategorized | Leave a comment

NTFS pisses me off.

NTFS sucks.  The way it prevents files-in-use from being overwritten sucks.  It causes so many buggy system states due to Windows Updates being installed but the required reboot still pending.  Once in that state, Windows goes berzerk — random things crash, system slows down, network performance gets intermittent — until you finally reboot.  It’s even worse in Windows 10 with the new “silent” defaults for Automatic Updates, because now it’ll just silently download and install but then schedule a reboot for later, thus leaving your system in an unstable bizarre state and not even telling you that’s the case.  So you sit down to use Windows 10, and everything’s acting buggy and weird, and you tear your hair out for an hour trying to figure out if you’ve got a failing RAM stick or need to roll back to a previous System Restore state (which, btw, is not enabled by default in Windows 10, thanks Microsoft!), only to finally discover there’s a pending reboot needed due to Windows Updates.  You reboot, and all the problems are magically gone.  All due to NTFS sucking hairy goat spheroids.

Posted in Uncategorized | Leave a comment

I finally figured out what “Twin Peaks” is all about

Unlike most folks, I never paid any attention to “Twin Peaks” until very recently.  When I read that a new season would begin filming — 20+ years after the original season —  on site near my home in Sammamish, WA, I figured I should check out the original show on Netflix to see what all the fuss was about.

After working my way through most of the original two seasons and spending countless hours letting it digest without trying to think too much about the plot or the meaning, I finally had an epiphany: “Twin Peaks” is basically “Portlandia” in subtler form.

SPOILER ALERT: The rest of this post assumes you’ve watched the show.  There might be spoilers from here on out, but probably none of much consequence.  Anyway, you have been warned.

For anyone who’s been living in a cave, “Portlandia” is sort of a caricature of various quirky stereotypes commonly found around Portland, OR.  If you’ve never lived in the Pacific Northwest or visited Portland, let me fill you in: everything in that show is absolutely true.  It’s probably funnier if you assume it’s all exaggeration, but I assure you, it really isn’t.  Somewhere in Portland, right now, there really is a nutjob riding a bicycle as if he has all the right-of-way in the world because he’s “on a bike here!”, and there really are snobs in a restaurant someplace asking their waiter to confirm that their chicken dinner was made from free-range chickens raised by a polygamy-practicing hippie cult.

“Twin Peaks” isn’t a comedy, and it doesn’t leverage sarcasm, but I’ve realized it’s got the same essence.  Every character, subplot, and aspect of the show is designed to make fun of Seattle-area culture.  The difference is that while “Portlandia” wants the audience (even Portland natives) to be in on the joke and have a laugh, “Twin Peaks” is more like an Andy Kaufman act: the joke is squarely on the audience, requiring one to step outside the whole thing to even recognize the meta-humor.

Let’s start with the title, “Twin Peaks”.  If that doesn’t scream “boobs”, I don’t know what does.  No, not the anatomical kind.  I’m referring to boobs, as in idiots, morons, weirdos, and gullible nincompoops.  The very title of the show is plainly saying what the show is about.

Seriously, stick with me here.  Allow me to explain further.

Think about the characters, and the premise, as they are set out in the pilot episode: a murdered girl, a grieving father, a small town sheriff, an FBI agent called in to help.  It all starts normally enough.  And yet, something is already a bit off, foreshadowing events to come: the music and acting are eye-rollingly gut-wrenchingly overdramatic.  The execution is more like a soap opera than a weekly prime time show.  Why would the director do it this way?  Because soap operas are widely known for taking themselves way too seriously, and we all know the only people who really take them seriously are complete dimwits.  The music and acting style clearly say: If you take this show seriously, you’re a gullible boob.

Well, don’t feel too bad.  It’s easy enough to be a boob for a little while, because things get weird gradually enough that you either don’t notice it starting to happen or you just keep suspending increasing amounts of disbelief.  In this way, many people have likened the show to “Lost”.  Except “Lost” got increasingly weird in large part because it went on for so many seasons and the writers never really knew where it was going.  “Twin Peaks” doesn’t feel that haphazard or accidental, partly because it never attempts to explain anything even halfway in the first place, and partly because it’s only two seasons long.

Every character in the show is the kind of kook nobody sensible would ever take seriously.  A woman who talks to a log?  An FBI agent who guides his investigation based on dreams about a dancing midget?  A town psychiatrist who always wears 3D glasses and is happily married to a Hawaiian woman who doesn’t live with him?  A rotund obnoxious white woman dressed as an Asian businessman?  An FBI boss who’s deaf as a post and yells at everyone?  A weird local band that plays trance-like music in an old biker bar?  A military man who claims to have been abducted by aliens?

And yet, time and time again, these characters and their nonsensical behaviors and explanations are flatly accepted by everyone else without question.  Oh, you saw it in a vision?  Okay, proceed.  Oh, your log saw what?  Ah, I see.  Oh, you’re an Asian businessman?  Sure you are, here’s your room key.  The tacit acceptance of total idiocy at every turn is itself a form of idiocy, and it in turn breeds even more idiocy.  People taking themselves, their own drama and weirdness, and each other way too seriously.  They even take their coffee and local pie too seriously.  It’s boobs blindly following other boobs.  It’s “Twin Peaks”.

The entire show is a giant twisted thought experiment: What if we took a seemingly normal premise, except we set it in an area where everyone’s a boob, and let it run its course a while to see what happens?  Hey, you know what would be really funny?  If the kinds of boobs the show is about didn’t even get the joke and actually took the show seriously!

Posted in Uncategorized | Leave a comment

Stereoscopic 3D gaming is awesome

After purchasing a 3D-capable TV late last year, I wondered if I could use it for gaming in 3D.

It turns out NVIDIA has a driver add-on for most of their modern video cards that will allow the video card to produce a stereoscopic 3D signal out to your TV.  It works with a lot of games to varying degrees without any special support needing to be built into the game, since it’s just a driver-level layer.  And when it works, it’s spectacularly immersive.  Borderlands 2, Trackmania 2, Distance, and many others look amazing… and I swear the real sense of depth in an FPS actually improves my aim and makes sniping a pure joy.

Everybody keeps talking about AR and VR headsets being the hot new thing out of E3, but then discussion inevitably turns to the state of software support.  I’ll tell you this: if Occulus Rift simply works with NVIDIA’s 3D TV Play driver out of the box, its users will immediately have access to a more immersive experience in many of the games they already know and love.

That alone would be the “killer app” that would drive mass-adoption.  Instead of having to buy a 3DTV (and deal with the inevitable ghosting artifacts that arise from left/right image “crosstalk” through the 3D glasses), just put on a VR headset and have an awesome 3D gaming experience.

Posted in Uncategorized | Leave a comment

Steam voice chat won’t connect or work with in-home streaming enabled, but here’s a workaround

Steam (for Windows, at least) has this nifty “in-home streaming” feature that’s sort of like Remote Desktop for gaming.  It lets you use an underpowered PC in your house (like a laptop) as a thin client for your main gaming PC.

If this feature is enabled, and your Steam account happens to be logged into multiple PCs/devices, and you try to use one PC to start or join a Steam voice chat, it will refuse to connect (without giving you any helpful error message) due to a really obnoxious bug in the Steam client.

Here’s the workaround to get voice chat working:

  1. Log your Steam account out of ALL Steam clients on ALL PCs/devices.
  2. Now that you are completely logged out, have everyone else who was attempting to voice chat with you restart their Steam clients.  They must do this to “reset” their Steam clients’ knowledge of which Steam client you are using.
  3. Now you can log back into the Steam client ONLY on the PC you are trying to use.
  4. Now your voice chat will finally connect and work.

Hopefully Valve will get off their collective asses and stop dicking around with Linux long enough to fix this incredibly obnoxious issue impacting the majority (i.e. Windows users) of their customer base.

Posted in Uncategorized | Leave a comment

Fix for Ubisoft UPlay bug: Unable to update Assasin’s Creed IV

Running UPlay as admin as others have suggested did not solve this for me.  Neither did changing the install cache location as others have suggested.  Here’s what DID work for me:

  1.  Exit UPlay.
  2. Manually delete the following two files:
    • c:\Program Files (x86)\Ubisoft\Ubisoft Game Launcher\data\273\uplay_install.state
    • c:\Program Files (x86)\Ubisoft\Ubisoft Game Launcher\data\273\uplay_install_tmp.manifest
  3. Launch UPlay.
  4. Click the drop-arrow next to the PLAY/DOWNLOAD button on AC IV and choose “Verify Game Files”.
  5. Once verification is done, the issue should be fixed and you should now be able to successfully update.

This appears to be caused by a bug in the UPlay app.

Posted in Uncategorized | Leave a comment

Focusrite Scarlett USB audio interface: disconnection problems

A simple Google search on “Focusrite Scarlett disconnect” reveals this to be a common problem with no clear solution.  I’ve experienced and solved this issue on two independent PC+Scarlett setups, and both times it boiled down to the same problem: the USB cable.

Not only do you need an A-to-B cable specifically rated for USB 2.0 (or higher) compatibility, but you need to ensure it is a short cable (I’d say 6 feet max) with at least one good ferrite core around the end that plugs into the back of the Scarlett.  Ideally you’d use a cable with two ferrite cores (one around each end).  And do not use a USB extension cable or USB hub in between the Scarlett and the computer.

In case you don’t know what I’m talking about when I say “ferrite core”, just plug the following search into Amazon: “USB 2.0 A to B ferrite”.

Posted in Uncategorized | 2 Comments