Wednesday, April 6, 2016

Google, Chrome and Delphi

So, what does Delphi have to do with Google and Chrome? Interesting question. It turns out Delphi has been very beneficial to helping me diagnose and troubleshoot the Chrome browser.

Just today, I was diagnosing some issues with the manner in which Chrome handles precision trackpad scrolling using the two-finger gesture. Specifically, on a Microsoft Surface Book.

I needed to synthesize WM_MOUSEWHEEL messages using the SendInput() in order to finely control the timing and number of messages which are sent. I'm a Delphi MVP (man they'll let anyone into this program!) and have my own copy, I fired up Delphi and wrote a quick little app that I can use to send those input messages to any HWND. Using Delphi this took me approximately 15 minutes from File|New|VCL Application to actually observing the Chrome browser scroll.

I've also used VS2015 to build a raw Windows applications for testing, and such an app is far less functional and took me twice or more as long to write. Sometimes I need to use with a raw Windows application for testing, but Delphi is still my primary go-to for trying new things on Windows.

More than once, while my co-workers and I are discussing some idea, feature, bug, or Windows behavior, I've fired up Delphi and whipped out an application to demonstrate that idea or behavior. Most of the time before we've even finished the discussion, I'll turn around point to my screen where the Delphi application is running and say, "you mean like this?"

I guess old habits are hard to break. I'm not going to declare that Delphi is somehow my "secret weapon"... but I will say that it has certainly been beneficial to helping me do my job.

No comments:

Post a Comment

Please keep your comments related to the post on which you are commenting. No spam, personal attacks, or general nastiness. I will be watching and will delete comments I find irrelevant, offensive and unnecessary.