T
TS
I get this error randomly that doesn't seem to cause anything to not work
correctly. The exception is caught, and seems to not affect the application
at all:
The code I used to make is so the form cannot be moved:
private const int WM_NCLBUTTONDOWN = 0XA1;
private const int WM_SYSCOMMAND = 0X112;
private const int HTCAPTION = 0X2;
private const int SC_MOVE = 0XF010;
protected override void WndProc(ref Message m)
{
if (m.Msg == WM_SYSCOMMAND && m.WParam.ToInt32() == SC_MOVE || m.Msg ==
WM_NCLBUTTONDOWN && m.WParam.ToInt32() == HTCAPTION)
return;
}
base.WndProc(ref m);
}
The exception:
General Information
*********************************************
Additional Info:
ExceptionManager.MachineName: XXXXXXXXXX
ExceptionManager.TimeStamp: 12/1/2004 1:26:24 PM
ExceptionManager.FullName: Microsoft.ApplicationBlocks.ExceptionManagement,
Version=1.0.1441.27626, Culture=neutral, PublicKeyToken=null
ExceptionManager.AppDomainName: AdltTestUILoader.exe
ExceptionManager.ThreadIdentity:
ExceptionManager.WindowsIdentity:XXXXXXXXXX\Administrator
1) Exception Information
*********************************************
Exception Type: System.NullReferenceException
Message: Object reference not set to an instance of an object.
TargetSite: Void Form_Activated(System.Object, System.EventArgs)
HelpLink: NULL
Source: Microsoft.ApplicationBlocks.UIProcess
StackTrace Information
*********************************************
at
Microsoft.ApplicationBlocks.UIProcess.WindowsFormViewManager.Form_Activated(
Object source, EventArgs e)
at System.Windows.Forms.Form.OnActivated(EventArgs e)
at System.Windows.Forms.Form.set_Active(Boolean value)
at System.Windows.Forms.Form.WmActivate(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at TxDpsAdlt.UI.BaseForm.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)
Is there anyway to figure out what is happening? Like I said, it happens
very irregularly, so I can't really debug it.
thanks a bunch!
correctly. The exception is caught, and seems to not affect the application
at all:
The code I used to make is so the form cannot be moved:
private const int WM_NCLBUTTONDOWN = 0XA1;
private const int WM_SYSCOMMAND = 0X112;
private const int HTCAPTION = 0X2;
private const int SC_MOVE = 0XF010;
protected override void WndProc(ref Message m)
{
if (m.Msg == WM_SYSCOMMAND && m.WParam.ToInt32() == SC_MOVE || m.Msg ==
WM_NCLBUTTONDOWN && m.WParam.ToInt32() == HTCAPTION)
return;
}
base.WndProc(ref m);
}
The exception:
General Information
*********************************************
Additional Info:
ExceptionManager.MachineName: XXXXXXXXXX
ExceptionManager.TimeStamp: 12/1/2004 1:26:24 PM
ExceptionManager.FullName: Microsoft.ApplicationBlocks.ExceptionManagement,
Version=1.0.1441.27626, Culture=neutral, PublicKeyToken=null
ExceptionManager.AppDomainName: AdltTestUILoader.exe
ExceptionManager.ThreadIdentity:
ExceptionManager.WindowsIdentity:XXXXXXXXXX\Administrator
1) Exception Information
*********************************************
Exception Type: System.NullReferenceException
Message: Object reference not set to an instance of an object.
TargetSite: Void Form_Activated(System.Object, System.EventArgs)
HelpLink: NULL
Source: Microsoft.ApplicationBlocks.UIProcess
StackTrace Information
*********************************************
at
Microsoft.ApplicationBlocks.UIProcess.WindowsFormViewManager.Form_Activated(
Object source, EventArgs e)
at System.Windows.Forms.Form.OnActivated(EventArgs e)
at System.Windows.Forms.Form.set_Active(Boolean value)
at System.Windows.Forms.Form.WmActivate(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at TxDpsAdlt.UI.BaseForm.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)
Is there anyway to figure out what is happening? Like I said, it happens
very irregularly, so I can't really debug it.
thanks a bunch!