473,325 Members | 2,774 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 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 3666
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Terrence | last post by:
I am doing some of the C# walkthroughs to transition from VB to C#. When I try to execute static void Main() { Aplication.Run(new Form1()) } I raise a 'System.NullReferenceException" in...
7
by: David Elliott | last post by:
I have created an application that will dynamically load other DLLs (plugins). The new plugin is a winform with an embedded IE Browser. I am wanting to have the form to run in its own thread....
2
by: fperfect13 | last post by:
Hi, I have the folowing exception Exception : System.NullReferenceException: Object reference not set to an instance of an object. 00000019 3:30:48 PM at...
3
by: Ryan Liu | last post by:
Hi there, I got a NullReferenceException when delete last row in a datagrid. I had hard time to solve since it does not occur in my own code. I put a datagrid in my inherited user control,...
2
by: Raed Sawalha | last post by:
i have a windows form(Main) with listview, when click an item in listview i open other window form (Sub) which generate the selected item from parent window in as treeview items when click any item...
2
by: Greg Bacchus | last post by:
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...
3
by: Marcus Kwok | last post by:
I have been staring at this code and I cannot see what is wrong with it. I am getting a NullReferenceException when trying to pass a value struct to a method. This exception only happens in...
1
by: Paul | last post by:
Hello All, In the following code I was expecting to get a NullReferenceException, but that didn't happen. I was hoping someone could explain why. I have two classes, Form1 and Ticker. As soon...
0
by: =?Utf-8?B?TWFyY3VzIFNjaGFlZmVy?= | last post by:
Hi everybody, I'm working on my application for appr. 2 years and now suddenly I got an System.TypeInitializationException in one of my global modules. The error is thrown at the first call of a...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.