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.
Unfortunately, activation email could not send to your email. Please try again.

TabbedMDIManager: Exception after press ctrl+tab where no mdi child window exist

Thread ID:

Created:

Updated:

Platform:

Replies:

56735 Feb 20,2007 06:39 AM Apr 11,2007 10:22 AM Windows Forms 6
loading
Tags: Tools
Michal Iwicki
Asked On February 20, 2007 06:39 AM

Hello,
I have problem with TabbedMDIManager.
When no mdi child window exists when user press ctrl+tab exception is thrown:

************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
at Syncfusion.Windows.Forms.Tools.TabbedMDIManager.ProcessCmdKey(Keys keyData, Boolean isSysKeyDown)
at Syncfusion.Windows.Forms.Tools.TabbedMDIManager.PreFilterMessage(Message& m)
***
When one or more child window exist everything work ok.

These same problem exists in Syncfusion tutorial examples (after deletion of any mdi child)

Syncfusion: Assembly Version: 4.402.0.51

Thank you for any help,

Regards


Golda Rebecal [Syncfusion]
Replied On February 20, 2007 08:55 AM

Hi Michal,

I am able to see the exception being thrown on pressing Ctrl-tab when there are no tabs.

We can resolve this issue by handling the Application.ThreadException.

Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException);

static void Application_ThreadException(object sender, System.Threading.ThreadExceptionEventArgs e)
{

}
Please have a look at the attached sample and let me know if you need any further assistance.

Thanks for using Syncfusion products.

Best Regards,
Golda


cs50.zip

Michal Iwicki
Replied On February 21, 2007 03:10 AM

Thank you for answer.
It works :-),
but I wonder if it is possible that this exception will be catched by Syncfusion TabbedMDIManager object in next release.

Regards

Golda Rebecal [Syncfusion]
Replied On February 21, 2007 07:13 AM

Hi Michal,

Thanks for the update.

I have logged a bug report regarding this issue so that it would be fixed in the future release.

We appreciate your interest in Syncfusion products.

Best Regards,
Golda

James Sandys-Lumsdaine
Replied On April 11, 2007 08:27 AM

I've found you can workaround this by overriding the ProcessCmdKey() method as below. Any thoughts from the Syncfusion people?

public override bool ProcessCmdKey(Keys keyData, bool isSysKeyDown)
{
if (keyData == (Keys.Control | Keys.Tab) ||
keyData == (Keys.Control | Keys.Tab | Keys.Shift))
{
if (MdiParent.MdiChildren.Length == 0)
return true;
}

return base.ProcessCmdKey(keyData, isSysKeyDown);
}

Golda Rebecal [Syncfusion]
Replied On April 11, 2007 09:33 AM

Hi jas_sl,

The issue of NullReference exception being thrown on pressing Ctrl-tab when there are no MDI tabs has been fixed in Essential Studio V5.

Could you please refer the following forum thread to obtain the beta version of Essential Studio v5?

http://www.syncfusion.com/support/forums/message.aspx?&MessageID=57573

Kindly let me know if you have any other questions.

Best Regards,
Golda

James Sandys-Lumsdaine
Replied On April 11, 2007 10:22 AM

Thanks for the info - I'm not sure we're able to upgrade to v5 just yet but I'll bear that in mind.

Thanks.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;