We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Initial toolbar drawing causes screen flashing

Although I pre-register all MDI child types the intial drawing of the menus/toolbars causes the screen to flash. This effect is exacerbated when the screen background is set to a bit map. It looks like the following happens :- - backdrop is painted - menus/toolbar painted - backdrop repainted Can you suggest a way to avoid this? I enclose the XPmenusMDI example with the following changes :- - application opens maximised - backdrop is set to logo.jpg I know it is only a small point but I would like to achieve the same slick look as in for example starting Word. Thanks, Mick XPMenusMDI2_9651.zip

4 Replies

AD Administrator Syncfusion Team March 18, 2005 02:45 PM

Hi Mick, There were some issues with flickering in v3.0 of XPMenus. There are some workarounds/hacks that can be done to reduce the flickering, you could wait for our next release, or you could create a DirectTrac incident and request the build that the XPMenu flicker was fixed in. If you prefer the former, please let me know and I''ll provide you the list of workarounds. Regards, Gregory Austin Syncfusion Inc.


MS Mick Speake March 19, 2005 04:12 AM

Thanks for the feedback, Gregory. I''ll try the workarounds, first, if you could let me have the details. Regards, Mick


AD Administrator Syncfusion Team March 21, 2005 11:05 AM

Hi Mick, After reviewing your application, there are two things that cause the flickering. The first is that the background image is set (and therefore sized) before the Toolbars have been loaded. This can be prevented by adding a call to SuspendLayout() before setting the background image in the constructor. You can then start a short Timer at the end of your Form.Load event handler, that calls ResumeLayout(true) when it''s done. This will prevent the background image from being sized until after the Toolbars are loaded. The second problem is that your application is being immediately Maximized after loading. This effectively doubles the flickering you experience. This can be avoided by not maximizing your window and setting the Form size to the WorkingArea of the Primary Screen. public MainForm() { //Majority of Constructor this.Size = System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Size; this.SuspendLayout(); //Set background image } private void Form1_Load(sender, e) { //Current Code this.timer1.Start() } private void timer1_Start(sender, e) { this.ResumeLayout(true); } These changes should make your application look much better. Please let me know if you have any further questions or concerns. Regards, Gregory Austin Syncfusion Inc.


MS Mick Speake March 21, 2005 12:46 PM

Thanks, Gregory, That''s a big improvement. Regards, Mick

Loader.
Live Chat Icon For mobile
Up arrow icon