From 7887cfa2387b4115190f5018719afe21cc8ff26d Mon Sep 17 00:00:00 2001 From: Karthick-Arjunan <102575025+Karthick-Arjunan@users.noreply.github.com> Date: Fri, 1 Aug 2025 16:13:41 +0530 Subject: [PATCH 1/4] Updated the MDI Child Form flicker prevention documentation with necessary details --- ...lickering-while-creating-MDI-child-form.md | 23 ++++++++++++------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/WindowsForms/Docking-Manager/FAQ/MDIChild/How-to-avoid-flickering-while-creating-MDI-child-form.md b/WindowsForms/Docking-Manager/FAQ/MDIChild/How-to-avoid-flickering-while-creating-MDI-child-form.md index 8a5d30e22..87294bd23 100644 --- a/WindowsForms/Docking-Manager/FAQ/MDIChild/How-to-avoid-flickering-while-creating-MDI-child-form.md +++ b/WindowsForms/Docking-Manager/FAQ/MDIChild/How-to-avoid-flickering-while-creating-MDI-child-form.md @@ -9,12 +9,16 @@ documentation: ug # How to avoid flickering while creating MDI child form? -Flickering can be avoided by calling the below methods. +Flickering can occur when creating and docking MDI child forms due to frequent redraws and layout updates. This can be avoided by calling the below methods. * LockHostFormUpdate -* UnLockHostFormUpdate +* UnlockHostFormUpdate -The LockHostFormUpdate and UnLockHostFormUpdate methods are used to lock and unlock the host form's updates respectively. These methods helps in avoiding flickering while creating an MDI child form. These methods can be used in the following way. +The LockHostFormUpdate and UnlockHostFormUpdate methods are used to temporarily suspend and resume UI updates on the host form. This prevent flickering while creating an MDI child form. + +**When to Use These Methods** + +Use LockHostFormUpdate() before performing any docking or layout operations, and UnlockHostFormUpdate() after the operations are complete. This ensures that the host form does not redraw multiple times during the process, which is the primary cause of flickering. These methods can be used in the following way. {% tabs %} @@ -22,14 +26,15 @@ The LockHostFormUpdate and UnLockHostFormUpdate methods are used to lock and unl //To avoid flickering +//Lock the host form to prevent flickering during layout changes this.dockingManager1.LockHostFormUpdate(); +//Dock and configure the MDI child form this.dockingManager1.DockControl(form, this, Syncfusion.Windows.Forms.Tools.DockingStyle.Right, 0); - this.dockingManager1.SetAsMDIChild(form, true); - this.dockingManager1.SetControlSize(form, size); +//Unlock the host form to resume UI updates this.dockingManager1.UnlockHostFormUpdate(); {% endhighlight %} @@ -37,20 +42,22 @@ this.dockingManager1.UnlockHostFormUpdate(); {% highlight VB %} - 'To avoid flickering +'Lock the host form to prevent flickering during layout changes Me.dockingManager1.LockHostFormUpdate() +'Dock and configure the MDI child form Me.dockingManager1.DockControl(form, Me, Syncfusion.Windows.Forms.Tools.DockingStyle.Right, 0) - Me.dockingManager1.SetAsMDIChild(form, True) - Me.dockingManager1.SetControlSize(form, size) +'Unlock the host form to resume UI updates Me.dockingManager1.UnlockHostFormUpdate() {% endhighlight %} {% endtabs %} +When multiple UI changes happen rapidly (like docking, resizing, or adding controls), the form may redraw several times, causing flickering. By locking updates during these operations, you ensure that the form redraws only once, after all changes are complete. + From 10fc1031ae0de1e250f4364cb92ac4c37392cf89 Mon Sep 17 00:00:00 2001 From: Karthick-Arjunan <102575025+Karthick-Arjunan@users.noreply.github.com> Date: Fri, 1 Aug 2025 16:28:19 +0530 Subject: [PATCH 2/4] Updated --- .../How-to-avoid-flickering-while-creating-MDI-child-form.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/WindowsForms/Docking-Manager/FAQ/MDIChild/How-to-avoid-flickering-while-creating-MDI-child-form.md b/WindowsForms/Docking-Manager/FAQ/MDIChild/How-to-avoid-flickering-while-creating-MDI-child-form.md index 87294bd23..ee97c3433 100644 --- a/WindowsForms/Docking-Manager/FAQ/MDIChild/How-to-avoid-flickering-while-creating-MDI-child-form.md +++ b/WindowsForms/Docking-Manager/FAQ/MDIChild/How-to-avoid-flickering-while-creating-MDI-child-form.md @@ -1,7 +1,7 @@ --- layout: post -title: How to avoid flickering while creating MDI child form | WindowsForms | Syncfusion® -description: How to avoid flickering while creating MDI child form +title: How to avoid flickering while creating MDI child form +description: Learn how to avoid flickering when creating and docking MDI child forms in Windows Forms applications using Syncfusion Docking Manager. platform: windowsforms control: DockingManager documentation: ug From 1048c8de39a55bf632ceadd06c7bb11a95ed0f7d Mon Sep 17 00:00:00 2001 From: Karthick-Arjunan <102575025+Karthick-Arjunan@users.noreply.github.com> Date: Fri, 1 Aug 2025 16:33:17 +0530 Subject: [PATCH 3/4] Updated --- .../How-to-avoid-flickering-while-creating-MDI-child-form.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WindowsForms/Docking-Manager/FAQ/MDIChild/How-to-avoid-flickering-while-creating-MDI-child-form.md b/WindowsForms/Docking-Manager/FAQ/MDIChild/How-to-avoid-flickering-while-creating-MDI-child-form.md index ee97c3433..f5d3fd8e7 100644 --- a/WindowsForms/Docking-Manager/FAQ/MDIChild/How-to-avoid-flickering-while-creating-MDI-child-form.md +++ b/WindowsForms/Docking-Manager/FAQ/MDIChild/How-to-avoid-flickering-while-creating-MDI-child-form.md @@ -1,6 +1,6 @@ --- layout: post -title: How to avoid flickering while creating MDI child form +title: How to avoid flickering while creating MDI child form | Syncfusion® description: Learn how to avoid flickering when creating and docking MDI child forms in Windows Forms applications using Syncfusion Docking Manager. platform: windowsforms control: DockingManager From 01036e3f82d5a637d2a26684cd51df5aa7190d92 Mon Sep 17 00:00:00 2001 From: Karthick-Arjunan <102575025+Karthick-Arjunan@users.noreply.github.com> Date: Tue, 5 Aug 2025 16:07:03 +0530 Subject: [PATCH 4/4] Update How-to-avoid-flickering-while-creating-MDI-child-form.md --- .../How-to-avoid-flickering-while-creating-MDI-child-form.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WindowsForms/Docking-Manager/FAQ/MDIChild/How-to-avoid-flickering-while-creating-MDI-child-form.md b/WindowsForms/Docking-Manager/FAQ/MDIChild/How-to-avoid-flickering-while-creating-MDI-child-form.md index f5d3fd8e7..2c4586409 100644 --- a/WindowsForms/Docking-Manager/FAQ/MDIChild/How-to-avoid-flickering-while-creating-MDI-child-form.md +++ b/WindowsForms/Docking-Manager/FAQ/MDIChild/How-to-avoid-flickering-while-creating-MDI-child-form.md @@ -59,5 +59,5 @@ Me.dockingManager1.UnlockHostFormUpdate() {% endtabs %} -When multiple UI changes happen rapidly (like docking, resizing, or adding controls), the form may redraw several times, causing flickering. By locking updates during these operations, you ensure that the form redraws only once, after all changes are complete. +When multiple UI changes happen rapidly (like docking, resizing, or adding controls), the form may redraw several times, causing flickering. By locking updates during these operations, allowing the form to redraw only once, after all changes are complete.