Notifications
                
            
                Clear all
    
            
        [Closed] Maxform using dispose will crash
Feb 01, 2021 4:46 pm
                      global LoadingForm
fn loading =
(
	try LoadingForm.Dispose() catch() -- crash
	-- try LoadingForm.Close() catch() -- ok
	--	
	LoadingForm = DotnetObject "MaxCustomControls.MaxForm"
	LoadingForm.Size = (DotnetObject "System.Drawing.Size" 500 600)
	LoadingForm.StartPosition = (DotnetClass "System.Windows.Forms.FormStartPosition").CenterScreen
	--
	MaxHwndPtr = (DotNetObject "System.IntPtr" (Windows.GetMaxHwnd()))
	LoadingForm.Show((DotNetObject "System.Windows.Forms.NativeWindow").FromHandle MaxHwndPtr)
)
loading()
	sleep 0.2
loading()
messageBox "crash!"
The test will crash in 2019 and 2021, and 2014 works well,god!
                             1 Reply