A
Adam J. Schaff
How can I issue an Alt+Tab command from within VB.NET code?
Specifically, I am trying to swap to the next application in the Alt+Tab
order in a way that is reversible with a single Alt+Tab to get back to my
application. That sounds redundant, but what I've found is that if I
minimize my app, it goes to the very end of the Alt+Tab list instead of
being the next in line.
Related Ramblings:
Oddly enough, in VB6, I had this behavior. Setting frm.WindowState =
vbMinimize would minimize my app but still keep it next in line for Alt+Tab.
The same (equivalent) code in VB.NET places it at the end of the Alt+Tab
list, which is no good for what I'm after.
Now I checked, and if I minimize my app by hand, it also goes to the back of
the order, so I think that the VB.NET WindowState=Minimize command more
correctly mimics user behavior. Nevertheless, it isn't what I'm after. So
I've decided that it's ok if my app doesn't minimize; it just needs to give
focus to the previous window in a way that allows the user to Alt+Tab back
to it with a single Alt+Tab.
Any help is appreciated.
-AJ
Specifically, I am trying to swap to the next application in the Alt+Tab
order in a way that is reversible with a single Alt+Tab to get back to my
application. That sounds redundant, but what I've found is that if I
minimize my app, it goes to the very end of the Alt+Tab list instead of
being the next in line.
Related Ramblings:
Oddly enough, in VB6, I had this behavior. Setting frm.WindowState =
vbMinimize would minimize my app but still keep it next in line for Alt+Tab.
The same (equivalent) code in VB.NET places it at the end of the Alt+Tab
list, which is no good for what I'm after.
Now I checked, and if I minimize my app by hand, it also goes to the back of
the order, so I think that the VB.NET WindowState=Minimize command more
correctly mimics user behavior. Nevertheless, it isn't what I'm after. So
I've decided that it's ok if my app doesn't minimize; it just needs to give
focus to the previous window in a way that allows the user to Alt+Tab back
to it with a single Alt+Tab.
Any help is appreciated.
-AJ