This should be a simple question, but search-foo has failed me. My goal is to detect that I'm running under Aero (Vista or Windows 7) and have my application Aerosnap by default. (It turns out that a corporate application I wrote is run by pretty much everyone aerosnapped right, with their Outlook snapped left.)
The application is WinForms and I'm currently doing
Width = Screen.PrimaryScreen.WorkingArea.Size.Width / 2;
Height = Screen.PrimaryScreen.WorkingArea.Size.Height;
Top = Screen.PrimaryScreen.WorkingArea.Top;
Left = Screen.PrimaryScreen.WorkingArea.Left +
Screen.PrimaryScreen.WorkingArea.Size.Width / 2;
in my forms's load event. This works great, except that if they use WindowKey+Arrow, it acts as if it was just a normally located form. This means WindowKey+Right does nothing on first press and WindowKey+Left snaps left. This isn't a major problem, but I would prefer if I could specify a window size and then snap the application to the Right so those keys act as they would with any other application.
I'm not sure this is possible, here are the things I did find:
These seem to indicate that there is no special AeroSnap message available. Anyone know otherwise?