[Patch] - Problem when using Keydown to hide then show on SfForm?

I have 2 Forms(Form1 and Form2) 
(Form2) doesn't contain a close button (x), it will be closed based on the keydown_event (press Esc) to hide (Me.hide) and will be opened (Frm2.location = mypoint: Frm2.showdialog()) based on the click event in Form 1.

The problem is that Form2 is inherited from SfForm (I only initialize Form2 only once: Frm2 = new form2, then will not use New() because I only need show and hide and I need to load some data so .visible cann't use). Everything well in the first showdialog. but when Form 1 triggered the 2nd event. I got an error in both of these lines (in Class Form1)
Frm2.location = mydefinepoint
Frm2.showdialog ()

When I addwatch it seems that it is still running in another stream and cannot be viewed.

Parameter is not valid.

************** Exception Text **************
System.ArgumentException: Parameter is not valid.
   at System.Drawing.Region.GetHrgn(Graphics g)
   at System.Windows.Forms.Control.GetHRgn(Region region)
   at System.Windows.Forms.Control.OnHandleCreated(EventArgs e)
   at System.Windows.Forms.Form.OnHandleCreated(EventArgs e)
   at System.Windows.Forms.Control.WmCreate(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.Form.WmCreate(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Additionally: Frm2.showdialog () reported the error:
'Form showDialog tried to set an ineligible form as its owner. Forms cannot own themselves or their owners.

when I changed the inherit SfForm to Form, it worked.
What should i do to avoid this?

6 Replies

TG The GridLock April 30, 2020 10:55 AM UTC

By the way, I have a 2nd question:
When running Me.hide , the main screen vibrated very strongly. Do you have any way for it to hide Form more smoothly?


SS Sampathnarayanan Sankaralingam Syncfusion Team May 1, 2020 02:07 PM UTC

Hi The GridLock 
   
Thank you for using Syncfusion Products. 
  
We can able to replicate your reported issue. Currently, we are checking possibilities to fix this issue. We will validate and update you the further details on May 5, 2020.   
   
We appreciate your patience until then.  
   
Regards,  
Sampath Narayanan S  



SS Susmitha Sundar Syncfusion Team May 6, 2020 03:41 PM UTC

 
Thank you for your patience. 
 
We have created bug report for the reported issue. We will fix this issue and provide you with patch. 
   
We appreciate your patience until then.  
 
You can track the status of this report through the following feedback link,   
 
 
 
Please confirm your Syncfusion version. So that we will provide the patch based on that. 
 
Regards, 
Susmitha S 



TG The GridLock May 6, 2020 07:29 PM UTC

Hi,
my Syncfusion version version 18.0.142


SS Susmitha Sundar Syncfusion Team May 7, 2020 05:45 AM UTC

Hi GridLock, 

Thank you for the conformation. 

As we mentioned earlier, we will fix this issue and update you with patch on May 20, 2020. 


We appreciate your patience until then. 

Regards, 
Susmitha S 



SS Susmitha Sundar Syncfusion Team May 20, 2020 03:47 PM UTC

Hi khanh dang, 
 
 
  v18.1.0.42 
Recommended approach – exe will perform automatic configuration       
Please find the patch setup here:   
           
Advanced approach – use only if you have specific needs and can directly replace existing assemblies for your build environment                        
Please find the patch assemblies alone from:  
 
Please find the Nugets from the below location: 
 
  
Assembly Version: 18.1.0.42 
Installation Directions:  
This patch should replace the files “Syncfusion.Shared.base” under the following folder.  
$system drive:\ Files\Syncfusion\Essential Studio\$Version # \precompiledassemblies\$Version#\4.0  
Eg : $system drive:\Program Files\Syncfusion\Essential Studio\ 18.1.0.42\precompiledassemblies\ 18.1.0.42\4.0  
   
To automatically run the Assembly Manager, please check the Run assembly manager checkbox option while installing the patch. If this option is unchecked, the patch will replace the assemblies in precompiled assemblies’ folder only. Then, you will have to manually copy and paste them to the preferred location, or you will have to run the Syncfusion Assembly Manager application (available from the Syncfusion Dashboard, installed as a shortcut in the Application menu) to re-install assemblies.  
   
Note 
To change how you receive bug fixes, ask your license management portal admin to change your project’s patch delivery mode.  
   
   
Disclaimer:  
If you have received other patches for the same version for other products, please apply all patches in the order received. Please note that we have created this patch for version 18.1.0.42 specifically to resolve the following issue reported in the incident 273940. This fix will be included in our Volume 2 release which is expected on June 2020.  
 
Regards, 
Susmitha S 


Loader.
Up arrow icon