views:

125

answers:

1

I'd like to flash the taskbar (as described here for example), but I can't P/Invoke FlashWindowEx (or anything else, for that matter) in the security context my application is running in.

Is there another way to get the taskbar to flash? If not, what are my options for getting the user's attention?

A: 

I'm afraid there is no other way to make the window flash from partially trusted code. You can't raise the form to the front either as there is no way to steal the focus like this. You can't use a NotifyIcon, or even a MessageBox from partial trust either, so it seems you are out of luck.

Here is a list of things you can't do in WinForms.

It looks like your only option is to find a way to elevate your code's privileges (perhaps get it signed and ask the user to trust your certificate). Aside from that, just wait until the user clicks on your app!

Jon Grant