Modal popup errors block MDI parent GUI updates
I am making a windows application which communicates with a microcontroller. Sometimes, communication error occurs which need to be flagged to the user. For instance, if the cable gets unplugged or the micr开发者_开发百科ocontroller loses power.
I've been struggling with this for awhile now, i'm back to my original solution. The original solution was to make popups but, other then being annoying, sometimes blocked the MDI parent GUI from updating it's display. Some stuff may happen while the popup is still open and that causes problems.
I've tried making the popup non-modal, and while that helped the GUI, the boss didn't like that the popup could be hidden by other windows.
What are the best-practices for flagging errors?
By the way, i had another thread with my alternate solution problems: Tooltip baloon display position (for error notification)
There are also other ways to communicate with the user... a blinking icon in the system tray, a status light on the main window that turns from green to red when the connection in lost.
* Update *
Blinking an icon in the system tray is as simple as creating a timer, and on the tick event, either display/hide the icon or switch it from one icon to another. You can find an example of this here:
http://www.freevbcode.com/ShowCode.asp?ID=6826
Just reread the question... if you're looking to blink the taskbar window, there's more to it... I wouldn't go with this approach, because (1) blinking taskbar can be disabled by the user, and (2) there's nothing to indicate why it's blinking. But if that's what you want, look here:
http://pietschsoft.com/post/2009/01/26/CSharp-Flash-Window-in-Taskbar-via-Win32-FlashWindowEx.aspx
You can make a window top-most without making it modal... what language are you coding in?
精彩评论