المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Flickering form problem



C# Programming
08-23-2009, 09:30 PM
Hi
I have created a graphically heavy windows forms application and when I minimize this application to system tray and bring it back, the form flickers for two seconds. Form contains over 5 transparent PNG images.

I am using this code to minimize to tray:
this.WindowState = FormWindowState.Minimized;
this.ShowInTaskbar = false;
TrayIcon.Visible = true;
TrayIcon.ShowBalloonTip(2500, "GameSec hala çal???yor!", "GameSec hala çal??maktad?r, tekrar g?rünür hale getirmek için t?klay?n.", ToolTipIcon.Info);

and this code to show it back:
this.WindowState = FormWindowState.Normal;
this.ShowInTaskbar = true;
TrayIcon.Visible = false;

I am aware that Hide() and Show() can be used in normal situations but it doesnt work for me because this form I am talking about is owned by another form.

Here is a video that I've created for you to see the problem by yourself:
http://www.youtube.com/watch?v=224IrASTu8E[^ (http://www.youtube.com/watch?v=224IrASTu8E)]

Thanks in advance.