Help with SendKey/PostMessage in C# to System Tray Process
I've scoured the net for answers but nothing is particularily relevant and I'm yet to find a solution to my problem.
I'm developing a windows app to be used on toughbook laptops. They use a program called Display Rotation Tool (IDRot.exe) to rotate the screen (shortcut alt+x). My form needs to be in landscape for some aspects and portrait for others. I'm trying to replicate doing alt+x with a button press but am getting nowhere fast. I've tried using SendKeys and PostMessage but the issue comes with the MainWindowHandle. In effect, IDRot is just a process that runs in the background and sits in the system tray so MainWindowHandle returns as 0 with a blank title. There is no active window for me to switch to to send the keys/message.
Anybody got any advice on other avenues to investigate?
(By just pressing alt+x manually the screen can be rotated with any window active but not within my windows app)
By Jacky in forum VB Classic
Last Post: 04-19-2010, 08:48 AM
Last Post: 01-17-2007, 04:28 PM
By Joe Lachoff in forum Architecture and Design
Last Post: 12-15-2000, 04:32 PM
By Pranav Kamkhalia in forum Java
Last Post: 10-22-2000, 03:51 AM
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL