471,354 Members | 2,103 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,354 software developers and data experts.

NullReferenceException in System.Windows.Forms.SafeNativeMethods.MessageBox

Hi, I'm getting an exception that really has me stumped. It's sporadic
at best, it's only happened a handful of times.
This particular time it happened when the user pressed 'Alt-S' to save
the data that they were entering.

Following is all exception information.

Any thoughts much appreciated.

Cheers
Greg
User: *****
When: 2005-07-12T16:00:52
Type: System.NullReferenceException
Message: Object reference not set to an instance of an object.
Source: System.Windows.Forms
Site: Int32 MessageBox(System.Runtime.InteropServices.HandleRe f,
System.String, System.String, Int32)

Trace:
at System.Windows.Forms.SafeNativeMethods.MessageBox( HandleRef hWnd,
String text, String caption, Int32 type)
at System.Windows.Forms.MessageBox.ShowCore(IWin32Win dow owner,
String text, String caption, MessageBoxButtons buttons, MessageBoxIcon
icon, MessageBoxDefaultButton defaultButton, MessageBoxOptions options)
at System.Windows.Forms.MessageBox.Show(IWin32Window owner, String
text, String caption, MessageBoxButtons buttons, MessageBoxIcon icon)
at ConsignmentUI.Process.ShowConsignment.SaveClicked( Object sender,
EventArgs e)
at ConsignmentUI.Components.Pages.ConsignmentPage.OnS aveClicked()
at
ConsignmentUI.Components.Pages.ConsignmentPage.but tonSave_Click(Object
sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at IndigoControls.ImageButton.OnClick(EventArgs e)
at IndigoControls.ImageButton.PerformClick()
at IndigoControls.ImageButton.ProcessMnemonic(Char charCode)
at System.Windows.Forms.Control._ProcessMnemonic(Char charCode)
at System.Windows.Forms.ContainerControl.ProcessMnemo nic(Char
charCode)
at System.Windows.Forms.ContainerControl.ProcessDialo gChar(Char
charCode)
at System.Windows.Forms.Control.ProcessDialogChar(Cha r charCode)
at System.Windows.Forms.Control.ProcessDialogChar(Cha r charCode)
at System.Windows.Forms.Control.ProcessDialogChar(Cha r charCode)
at System.Windows.Forms.Control.ProcessDialogChar(Cha r charCode)
at System.Windows.Forms.ContainerControl.ProcessDialo gChar(Char
charCode)
at System.Windows.Forms.Control.ProcessDialogChar(Cha r charCode)
at System.Windows.Forms.Control.ProcessDialogChar(Cha r charCode)
at System.Windows.Forms.ContainerControl.ProcessDialo gChar(Char
charCode)
at System.Windows.Forms.Control.ProcessDialogChar(Cha r charCode)
at System.Windows.Forms.Control.PreProcessMessage(Mes sage& msg)
at
System.Windows.Forms.ThreadContext.System.Windows. Forms.UnsafeNativeMethods+IMsoComponent.FPreTransl ateMessage(MSG&
msg)

Jul 22 '05 #1
2 3480
Hi there,

You appear to be using a COM component in your application. Apparently the
component produces an error.
I am not sure though, tough to tell without the code.

Good luck!

--
Juan Romero
-----------------------------------------
The successful person has the habit of doing the things failures don't like
to do.
E.M. Gray
"Greg Bacchus" wrote:
Hi, I'm getting an exception that really has me stumped. It's sporadic
at best, it's only happened a handful of times.
This particular time it happened when the user pressed 'Alt-S' to save
the data that they were entering.

Following is all exception information.

Any thoughts much appreciated.

Cheers
Greg
User: *****
When: 2005-07-12T16:00:52
Type: System.NullReferenceException
Message: Object reference not set to an instance of an object.
Source: System.Windows.Forms
Site: Int32 MessageBox(System.Runtime.InteropServices.HandleRe f,
System.String, System.String, Int32)

Trace:
at System.Windows.Forms.SafeNativeMethods.MessageBox( HandleRef hWnd,
String text, String caption, Int32 type)
at System.Windows.Forms.MessageBox.ShowCore(IWin32Win dow owner,
String text, String caption, MessageBoxButtons buttons, MessageBoxIcon
icon, MessageBoxDefaultButton defaultButton, MessageBoxOptions options)
at System.Windows.Forms.MessageBox.Show(IWin32Window owner, String
text, String caption, MessageBoxButtons buttons, MessageBoxIcon icon)
at ConsignmentUI.Process.ShowConsignment.SaveClicked( Object sender,
EventArgs e)
at ConsignmentUI.Components.Pages.ConsignmentPage.OnS aveClicked()
at
ConsignmentUI.Components.Pages.ConsignmentPage.but tonSave_Click(Object
sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at IndigoControls.ImageButton.OnClick(EventArgs e)
at IndigoControls.ImageButton.PerformClick()
at IndigoControls.ImageButton.ProcessMnemonic(Char charCode)
at System.Windows.Forms.Control._ProcessMnemonic(Char charCode)
at System.Windows.Forms.ContainerControl.ProcessMnemo nic(Char
charCode)
at System.Windows.Forms.ContainerControl.ProcessDialo gChar(Char
charCode)
at System.Windows.Forms.Control.ProcessDialogChar(Cha r charCode)
at System.Windows.Forms.Control.ProcessDialogChar(Cha r charCode)
at System.Windows.Forms.Control.ProcessDialogChar(Cha r charCode)
at System.Windows.Forms.Control.ProcessDialogChar(Cha r charCode)
at System.Windows.Forms.ContainerControl.ProcessDialo gChar(Char
charCode)
at System.Windows.Forms.Control.ProcessDialogChar(Cha r charCode)
at System.Windows.Forms.Control.ProcessDialogChar(Cha r charCode)
at System.Windows.Forms.ContainerControl.ProcessDialo gChar(Char
charCode)
at System.Windows.Forms.Control.ProcessDialogChar(Cha r charCode)
at System.Windows.Forms.Control.PreProcessMessage(Mes sage& msg)
at
System.Windows.Forms.ThreadContext.System.Windows. Forms.UnsafeNativeMethods+IMsoComponent.FPreTransl ateMessage(MSG&
msg)

Jul 22 '05 #2
Ahh... where do you see that? I am using the HTML browser control but
nowhere near this part of the program... shouldn't even be loaded
here...

Greg

Jul 22 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Terrence | last post: by
1 post views Thread by Paul | last post: by
reply views Thread by =?Utf-8?B?TWFyY3VzIFNjaGFlZmVy?= | last post: by
reply views Thread by XIAOLAOHU | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.