473,837 Members | 1,516 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Exception dialog

Help,
I'm running VS.NET 2003 and when I try to start my application, I get the
"unhandled exception" dialog instead of the IDE highlighting the offending
line of code. The problem appears to be instantiating a particular class in
my project but the dialog doesn't tell me what code in the class is causing
the problem (and it a large class).

How can I get the IDE to take me to the offending line of code?
If I put this line in my machine.config file:
<configuratio n>
<system.windows .forms jitDebugging="t rue" />
</configuration>

the IDE tells me that there's something wrong with that line in
machine.config.
The registry contains the correct values for the debugger.
for instance
DbgJITDebugLaun chSetting is set to 2
and
DbgManagedDebug ger is set to "C:\Program Files\Common Files\Microsoft
Shared\VS7Debug \vs7jit.exe" PID %d APPDOM %d EXTEXT "%s" EVTHDL %d

If anybody has any ideas on this one, I would sure appreciate the help.

Thanks
Steve

Nov 20 '05 #1
6 4058
look at the stack trace of the exception (and possibly recurse
innerexceptions ) ...
"Steve Long" <St**********@N oSpam.com> wrote in message
news:ew******** ******@TK2MSFTN GP09.phx.gbl...
Help,
I'm running VS.NET 2003 and when I try to start my application, I get the
"unhandled exception" dialog instead of the IDE highlighting the offending
line of code. The problem appears to be instantiating a particular class in my project but the dialog doesn't tell me what code in the class is causing the problem (and it a large class).

How can I get the IDE to take me to the offending line of code?
If I put this line in my machine.config file:
<configuratio n>
<system.windows .forms jitDebugging="t rue" />
</configuration>

the IDE tells me that there's something wrong with that line in
machine.config.
The registry contains the correct values for the debugger.
for instance
DbgJITDebugLaun chSetting is set to 2
and
DbgManagedDebug ger is set to "C:\Program Files\Common Files\Microsoft
Shared\VS7Debug \vs7jit.exe" PID %d APPDOM %d EXTEXT "%s" EVTHDL %d

If anybody has any ideas on this one, I would sure appreciate the help.

Thanks
Steve

Nov 20 '05 #2
I didn't want to post this but here's the message text and I don't really
get much out of it. The IDE isn't breaking on the exception so I'm not
getting anything but this.

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.TypeLoad Exception: Signature of the body and declaration in a method
implementation do not match. Type: iMap.GUIMgr. Assembly: iMap,
Version=1.0.163 4.22071, Culture=neutral , PublicKeyToken= null.
at iMap.frmMain.fr mMain_Load(Obje ct sender, EventArgs e)
at System.Windows. Forms.Form.OnLo ad(EventArgs e)
at System.Windows. Forms.Form.OnCr eateControl()
at System.Windows. Forms.Control.C reateControl(Bo olean fIgnoreVisible)
at System.Windows. Forms.Control.C reateControl()
at System.Windows. Forms.Control.W mShowWindow(Mes sage& m)
at System.Windows. Forms.Control.W ndProc(Message& m)
at System.Windows. Forms.Scrollabl eControl.WndPro c(Message& m)
at System.Windows. Forms.Container Control.WndProc (Message& m)
at System.Windows. Forms.Form.WmSh owWindow(Messag e& m)
at System.Windows. Forms.Form.WndP roc(Message& m)
at System.Windows. Forms.ControlNa tiveWindow.OnMe ssage(Message& m)
at System.Windows. Forms.ControlNa tiveWindow.WndP roc(Message& m)
at System.Windows. Forms.NativeWin dow.Callback(In tPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)
************** Loaded Assemblies **************
mscorlib
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/microsoft.net/framework/v1.1.4322/mscorlib.dll
----------------------------------------
iMap
Assembly Version: 1.0.1634.22071
Win32 Version: 1.0.1634.22071
CodeBase: file:///C:/Projects2003/Vb.net/iMap/bin/iMap.exe
----------------------------------------
System.Windows. Forms
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/assembly/gac/system.windows. forms/1.0.5000.0__b77 a5c561934e089/system.windows. forms.dll
----------------------------------------
System
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/assembly/gac/system/1.0.5000.0__b77 a5c561934e089/system.dll
----------------------------------------
Logger
Assembly Version: 1.0.1301.18847
Win32 Version: 1.0.1301.18847
CodeBase: file:///C:/Projects2003/Vb.net/iMap/bin/Logger.DLL
----------------------------------------
System.Drawing
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/assembly/gac/system.drawing/1.0.5000.0__b03 f5f7f11d50a3a/system.drawing. dll
----------------------------------------
SharpUI.Toolbar s
Assembly Version: 1.1.0.1208
Win32 Version: 1.1.0.1208
CodeBase:
file:///c:/windows/assembly/gac/sharpui.toolbar s/1.1.0.1208__f51 7ee9424cd48d0/sharpui.toolbar s.dll
----------------------------------------
ESRI.MapObjects 2.Control
Assembly Version: 2.2.1.0
Win32 Version: 2.2.1.0
CodeBase:
file:///c:/windows/assembly/gac/esri.mapobjects 2.control/2.2.1.0__8fc3cc 631e44ad86/esri.mapobjects 2.control.dll
----------------------------------------
TransparentLabe l
Assembly Version: 1.0.1585.23801
Win32 Version: 1.0.1585.23801
CodeBase: file:///C:/Projects2003/Vb.net/iMap/bin/TransparentLabe l.DLL
----------------------------------------
ActiveReports.X lsExport
Assembly Version: 3.2.1.1978
Win32 Version: 3.2.1.1978
CodeBase:
file:///c:/windows/assembly/gac/activereports.x lsexport/3.2.1.1978__cc4 967777c49a3ff/activereports.x lsexport.dll
----------------------------------------
ActiveReports.T extExport
Assembly Version: 3.2.1.1978
Win32 Version: 3.2.1.1978
CodeBase:
file:///c:/windows/assembly/gac/activereports.t extexport/3.2.1.1978__cc4 967777c49a3ff/activereports.t extexport.dll
----------------------------------------
SharpUI.Shared
Assembly Version: 1.1.0.1208
Win32 Version: 1.1.0.1208
CodeBase:
file:///c:/windows/assembly/gac/sharpui.shared/1.1.0.1208__f51 7ee9424cd48d0/sharpui.shared. dll
----------------------------------------
ESRI.MapObjects 2.Core
Assembly Version: 2.2.1.0
Win32 Version: 2.2.1.0
CodeBase:
file:///c:/windows/assembly/gac/esri.mapobjects 2.core/2.2.1.0__8fc3cc 631e44ad86/esri.mapobjects 2.core.dll
----------------------------------------
Accessibility
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/assembly/gac/accessibility/1.0.5000.0__b03 f5f7f11d50a3a/accessibility.d ll
----------------------------------------
RegGisDLL1
Assembly Version: 1.0.1630.17941
Win32 Version: 1.0.1630.17941
CodeBase: file:///C:/Projects2003/Vb.net/iMap/bin/RegGisDLL1.DLL
----------------------------------------
Managers
Assembly Version: 1.0.1626.25141
Win32 Version: 1.0.1626.25141
CodeBase: file:///C:/Projects2003/Vb.net/iMap/bin/Managers.DLL
----------------------------------------
CCMapTools_Net
Assembly Version: 1.0.1630.24830
Win32 Version: 1.0.1630.24830
CodeBase: file:///C:/Projects2003/Vb.net/iMap/bin/CCMapTools_Net. DLL
----------------------------------------

************** JIT Debugging **************
To enable just in time (JIT) debugging, the config file for this
application or machine (machine.config ) must have the
jitDebugging value set in the system.windows. forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuratio n>
<system.windows .forms jitDebugging="t rue" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the machine
rather than being handled by this dialog.

"Greg Young" <gr********@pla netbeach.com> wrote in message
news:eh******** ********@TK2MSF TNGP11.phx.gbl. ..
look at the stack trace of the exception (and possibly recurse
innerexceptions ) ...
"Steve Long" <St**********@N oSpam.com> wrote in message
news:ew******** ******@TK2MSFTN GP09.phx.gbl...
Help,
I'm running VS.NET 2003 and when I try to start my application, I get the "unhandled exception" dialog instead of the IDE highlighting the offending line of code. The problem appears to be instantiating a particular class

in
my project but the dialog doesn't tell me what code in the class is

causing
the problem (and it a large class).

How can I get the IDE to take me to the offending line of code?
If I put this line in my machine.config file:
<configuratio n>
<system.windows .forms jitDebugging="t rue" />
</configuration>

the IDE tells me that there's something wrong with that line in
machine.config.
The registry contains the correct values for the debugger.
for instance
DbgJITDebugLaun chSetting is set to 2
and
DbgManagedDebug ger is set to "C:\Program Files\Common Files\Microsoft
Shared\VS7Debug \vs7jit.exe" PID %d APPDOM %d EXTEXT "%s" EVTHDL %d

If anybody has any ideas on this one, I would sure appreciate the help.

Thanks
Steve


Nov 20 '05 #3
Steve Long wrote:
Help,
I'm running VS.NET 2003 and when I try to start my application, I get the
"unhandled exception" dialog instead of the IDE highlighting the offending
line of code. The problem appears to be instantiating a particular class in
my project but the dialog doesn't tell me what code in the class is causing
the problem (and it a large class).

How can I get the IDE to take me to the offending line of code?
If I put this line in my machine.config file:
<configuratio n>
<system.windows .forms jitDebugging="t rue" />
</configuration>

the IDE tells me that there's something wrong with that line in
machine.config.
The registry contains the correct values for the debugger.
for instance
DbgJITDebugLaun chSetting is set to 2
and
DbgManagedDebug ger is set to "C:\Program Files\Common Files\Microsoft
Shared\VS7Debug \vs7jit.exe" PID %d APPDOM %d EXTEXT "%s" EVTHDL %d

If anybody has any ideas on this one, I would sure appreciate the help.

Thanks
Steve

Hi Steve,
As a quick handle to the problem
Put a try /Catch around the code
try
Lots of code...
Catch obj ex as exception
msgbox("Error is " & ex.message)
End try

From the result you can then put in further blocks to narrow it down
HTH Bob
--
Please take out the garbage before using reply address.

Nov 20 '05 #4
This is not helpful. It's never getting to the line of code that seems to be
causing a problem. I'm instantiating an object in the Form.Load event and if
I comment that line of code out, all is well. However, if I leave that line
of code in, none of the code in the Form.Load event ever occurs. The best
message I get is:
System.TypeLoad Exception: Signature of the body and declaration in a method
implementation do not match. Type: iMap.GUIMgr. Assembly: iMap,
Version=1.0.163 4.22071, Culture=neutral , PublicKeyToken= null.

Additionally,
I added a handler for the System.Windows. Forms.Applicati on.ThreadExcept ion
event to try and trap this error and I get the same message as I just listed
above. I get nothing helpful here. If the CLR can detect an error, why am I
not taken to the offending line of code so I can fix it? I have looked
through the GUIMgr code and don't see anything obvious. I have looked at the
interfaces it implements and also don't see anything obvious. So, is there a
way to make the IDE stop throwing up this dumb Exception dialog and take me
to the error?

Steve
"bclegg" <bc****@adriley .co.nz> wrote in message
news:%2******** ********@tk2msf tngp13.phx.gbl. ..
Steve Long wrote:
Help,
I'm running VS.NET 2003 and when I try to start my application, I get the "unhandled exception" dialog instead of the IDE highlighting the offending line of code. The problem appears to be instantiating a particular class in my project but the dialog doesn't tell me what code in the class is causing the problem (and it a large class).

How can I get the IDE to take me to the offending line of code?
If I put this line in my machine.config file:
<configuratio n>
<system.windows .forms jitDebugging="t rue" />
</configuration>

the IDE tells me that there's something wrong with that line in
machine.config.
The registry contains the correct values for the debugger.
for instance
DbgJITDebugLaun chSetting is set to 2
and
DbgManagedDebug ger is set to "C:\Program Files\Common Files\Microsoft
Shared\VS7Debug \vs7jit.exe" PID %d APPDOM %d EXTEXT "%s" EVTHDL %d

If anybody has any ideas on this one, I would sure appreciate the help.

Thanks
Steve

Hi Steve,
As a quick handle to the problem
Put a try /Catch around the code
try
Lots of code...
Catch obj ex as exception
msgbox("Error is " & ex.message)
End try

From the result you can then put in further blocks to narrow it down
HTH Bob
--
Please take out the garbage before using reply address.

Nov 20 '05 #5
> This is not helpful. It's never getting to the line of code that seems to
be
causing a problem. I'm instantiating an object in the Form.Load event and if I comment that line of code out, all is well. However, if I leave that line of code in, none of the code in the Form.Load event ever occurs. The best
message I get is:
System.TypeLoad Exception: Signature of the body and declaration in a method implementation do not match. Type: iMap.GUIMgr. Assembly: iMap,
Version=1.0.163 4.22071, Culture=neutral , PublicKeyToken= null.
sounds like there is an issue with the loading of the type ...
Additionally,
I added a handler for the System.Windows. Forms.Applicati on.ThreadExcept ion
event to try and trap this error and I get the same message as I just listed above. I get nothing helpful here. If the CLR can detect an error, why am I not taken to the offending line of code so I can fix it? I have looked
through the GUIMgr code and don't see anything obvious. I have looked at the interfaces it implements and also don't see anything obvious. So, is there a way to make the IDE stop throwing up this dumb Exception dialog and take me to the error?


The CLR is taking you to the line of code ... it is failing loading the
type.

Can you put up the code for the type ?
Nov 20 '05 #6
I didn't want to cause I didn't want to put anybody through looking at it.
It's huge. Here goes. You asked for it:

Option Explicit On
Imports Managers
Imports CCMapTools_Net
Imports NonComCCCollect ion
Imports ESRI.MapObjects 2.Core
Imports DataDynamics.Sh arpUI
Imports DataDynamics.Sh arpUI.Input
Imports DataDynamics.Sh arpUI.Toolbars
Imports ADODB
Imports PlugIns
Imports RegGisDLL1
Imports CCSharpUITools
Imports LinkedList
Imports System.Reflecti on
Friend Class GUIMgr
Implements Managers.IGUIMg r
#Region "Constants"
Private Const DEFSRC As String = "CGUIMgr"
Private Const MENU_USAGE_FILE As String = "MenuUsage"
Private Const AB_LAYOUT As String = "ab.tbr"
Private Const PLUGINS_MENU_TE XT As String = "Plu&gIns"
Private Const PLUGINS_MENU_NA ME As String = "putPlugIns "
Private Const MAIN_MENU As String = "mnuMain"
Private Const PLUGINS_SUBMENU _NAME As String = "smPlugins"
#End Region

#Region "Private member variables"
Private m_iResize_Inter val As Short
Private m_iMapBottomBuf fer As Short
Private m_sCurrentMap As String
Private m_sPreviousMap As String
Private m_sMLQName As String
Private m_bOrthosOn As Boolean
Private m_sPlugInNames( ) As String
Private m_CurrentMap As String
#End Region

#Region "Private Complex objects"
Private mSharpTBM As UiToolbarManage r
Private WithEvents m_oPictBox As System.Windows. Forms.PictureBo x
Private m_oMap As ESRI.MapObjects 2.Core.AxMap
Private WithEvents m_oToc As CCMapTools_Net. CToc
'Private m_oTab As AxMSComctlLib.A xTabStrip
'Private m_oLegend As AxCCMO2legend23 .Axlegend
Private WithEvents m_cPrefMgr As CPreferencesMgr
Private m_cMapTips As CMaptips
Private m_ccolMLQs As NonComCCCollect ion.CCCollectio n
Private m_ccolViewTools As NonComCCCollect ion.CCCollectio n
Private m_ccolPlugIns As NonComCCCollect ion.CCCollectio n
Private m_ccolPlugInsLo aded As NonComCCCollect ion.CCCollectio n
Private m_cNavMgr As NavigationMgr
Private m_cImageLib As CImageLib
Private m_cSpatialQry As SpatialQryMgr
Private m_cImageMgr As CImageMgr
Private m_cSymDisp As CSymDisplayMgr '
Private m_cParcelSM As CParcelsSelecti onMgr
Private m_oPlugInString s As StringsLX
Private m_oLayersString s As StringsLX
#End Region

#Region "Events"
Public Event NewFavoriteMap( ByVal MapName As String)
#End Region

#Region "Public Properties"
Public WriteOnly Property Map() As ESRI.MapObjects 2.Core.AxMap
Set(ByVal Value As ESRI.MapObjects 2.Core.AxMap)
m_oMap = Value
End Set
End Property
Public Property PreferencesMgr( ) As CPreferencesMgr
Get
End Get
Set(ByVal Value As CPreferencesMgr )
End Set
End Property
'Public Property CurrentLegend() As Object
' Get
' Return m_oLegend
' End Get
' Set(ByVal Value As Object)
' m_oLegend = Value
' End Set
'End Property
Public Property ToolbarManager( ) As
DataDynamics.Sh arpUI.Toolbars. UiToolbarManage r Implements
IGUIMgr.Toolbar Manager
Get
Return mSharpTBM
End Get
Set(ByVal Value As DataDynamics.Sh arpUI.Toolbars. UiToolbarManage r)
mSharpTBM = Value
End Set
End Property
Public Property Toc() As CToc Implements Managers.IGUIMg r.Toc
Get
Return m_oToc
End Get
Set(ByVal Value As CToc)
m_oToc = Value
End Set
End Property
Public ReadOnly Property PlugInNames() As String()
Get
Static bInitialized As Boolean
Dim i As Short
If Not bInitialized Then
bInitialized = True
ReDim m_sPlugInNames( m_oPlugInString s.Count - 1)
For i = 0 To m_oPlugInString s.Count - 1
m_sPlugInNames( i) = m_oPlugInString s.Item(i)
Next i
End If
Return m_sPlugInNames
End Get
End Property
Public ReadOnly Property PlugInShowName( ByVal CreateName As String) As
String
Get
Dim cItem As RegGisDLL1.CIte mData
For Each cItem In m_ccolPlugInsLo aded
If cItem.regData = CreateName Then
Return cItem.Item
End If
Next cItem
End Get
End Property
Public Property PluginLoaded(By Val PlugInName As String) As Boolean
Get
If m_ccolPlugInsLo aded(PlugInName ).Tag = "Loaded" Then
Return True
Else
Return False
End If
End Get
Set(ByVal Value As Boolean)
If Value Then
m_ccolPlugInsLo aded(PlugInName ).Tag = "Loaded"
Else
m_ccolPlugInsLo aded(PlugInName ).Item = ""
End If
End Set
End Property
Public ReadOnly Property DynamicViewTool s() As CCCollection
Get
Return m_ccolViewTools
End Get
End Property
Public Property ImageMgr() As CImageMgr
Get
Return m_cImageMgr
End Get
Set(ByVal Value As CImageMgr)
m_cImageMgr = Value
End Set
End Property
Public Property MLQName() As String
Get
Return m_sMLQName
End Get
Set(ByVal Value As String)
m_sMLQName = Value
End Set
End Property
Public Property ShowMapTipCombo s() As Boolean
Get
Return
mSharpTBM.Bands .Item("barMapTo ols").Tools.Ite m("miVcboLayers ").Visible
End Get
Set(ByVal Value As Boolean)
Dim band As Toolbars.Band
band = mSharpTBM.Bands .Item("barMapTo ols")
With band
..Tools.Item("m iVcboLayers").V isible = Value
..Tools.Item("m iVcboFields").V isible = Value
If Value = True Then
Dim tol As DataDynamics.Sh arpUI.Toolbars. EditTool =
..Tools.Item("m iVcboLayers")
Dim cb As UiComboBox = tol.Control
cb.SelectedInde x = -1
tol = .Tools.Item("mi VcboFields")
cb = tol.Control
cb.SelectedInde x = -1
End If
' I'm not sure I need these next three lines. We'll see
'If band.Tag = -1 Then
' mSharpTBM.Bands .Item("barParce ls").DockingOff set = 0 ' band.DockingOff set
+ band.DockedVert Width
'End If
' .Bands("barParc els").Left = .Bands("barMapT ools").Left +
..Bands("barMap Tools").Width
mSharpTBM.Refre sh()
If Not Value Then
' Clear the maptip comboboxes
End If
End With
band = Nothing
End Set
End Property
Public Property CurrentMap() As String Implements
Managers.IGUIMg r.CurrentMap
Get
Return m_oToc.Activema p
End Get
Set(ByVal Value As String)
m_sCurrentMap = Value
m_cPrefMgr.Star tupMap = Value
End Set
End Property
Public Property MapTips() As CMaptips
Get
Return m_cMapTips
End Get
Set(ByVal Value As CMaptips)
m_cMapTips = Value
End Set
End Property
#End Region

#Region "Constructo rs"
Public Sub New()
MyBase.New()
Init()
End Sub
#End Region

#Region "Public Methods"
Public Function MLQMapObj(ByRef MLQName As String) As CMLQMaps
MLQMapObj = m_ccolMLQs(MLQN ame)
End Function
Public Sub CallPlugIns(ByR ef PlugInType As modMain.PlugInC alls, ByRef
PlugInParm() As Object)
Select Case PlugInType
Case modMain.PlugInC alls.epcSubject Set
PlugIn_SetSubje ct(PlugInParm(0 ))
Case modMain.PlugInC alls.epcAddParc el
PlugIn_AddParce l(PlugInParm(0) )
Case modMain.PlugInC alls.epcRemoveP arcel
PlugIn_RemovePa rcel(PlugInParm (0))
Case modMain.PlugInC alls.epcNewParc elSet
PlugIn_ParcelSe tSelected(PlugI nParm(0))
Case modMain.PlugInC alls.epcClearSe lectedParcels
PlugIn_ClearSel ectedParcels()
Case modMain.PlugInC alls.epcNewIden tity
If UBound(PlugInPa rm) < 1 Then
PlugIn_NewIdent ity(CStr(PlugIn Parm(0)))
Else
PlugIn_NewIdent ity(CStr(PlugIn Parm(0)), CBool(PlugInPar m(1)))
End If
Case modMain.PlugInC alls.epcNewMail ing
PlugIn_NewMaili ng(PlugInParm(0 ))
Case modMain.PlugInC alls.epcFeature Selected
PlugIn_FeatureS elected(PlugInP arm(0))
Case modMain.PlugInC alls.epcClearSe lectedFeatures
PlugIn_ClearSel ectedFeatures()
Case modMain.PlugInC alls.epcFeature SetSelected
PlugIn_FeatureS etSelected(Plug InParm(0))
Case modMain.PlugInC alls.epcNewMLQ
PlugIn_NewMLQ(P lugInParm(0))
Case modMain.PlugInC alls.epcMapAdde d
PlugIn_MapAdded (PlugInParm(0))
Case modMain.PlugInC alls.epcRelease MoSelect
PlugIn_ReleaseM oSelect()
End Select
End Sub
Public Sub ChangeMap(ByVal newMap As String, ByVal resetToc As Boolean)
Implements Managers.IGUIMg r.ChangeMap
If newMap <> m_CurrentMap Then
ShowMapTipCombo s = False
mSharpTBM.Comma nds.Item(CType( modMain.ToolIDs .etiMapTips, String)).Checke d =
False
End If
m_sPreviousMap = m_CurrentMap
m_CurrentMap = newMap
'Clear selected features if necessary
If m_sPreviousMap <> m_CurrentMap Then
frmMaps.DefInst ance.ShowNodeCu rrentMap()
With m_cSpatialQry
Try
If .SelectedFeatur es.Count > 0 Then
..Clear()
End If
Catch ex As Exception
Console.WriteLi ne(ex.Message)
End Try
End With
End If
' Turn off photos if necessary
Dim cFld As CField
cFld = New CField
If OrthosOn(cFld) = 0 Then
UnCheckOrthos(c Fld.Name)
m_cImageMgr.doO rthos(False)
End If
' If m_oActiveBar.To ols(CStr(etiOrt hos)).Checked = True Then
' m_oActiveBar.To ols(CStr(etiOrt hos)).Checked = False
' m_cImageMgr.doO rthos (False)
' End If
m_cPrefMgr.Star tupMap = newMap
If resetToc Then
With m_oToc
..Activemap = newMap
..IsLoading = True
..Refresh()
End With
' this next thing could be a problem until I get the legend converted to
..NET
'With m_oLegend
' .set_ColTextLay ers(m_oToc.Text LayerCollection )
' .LoadLegend(Tru e)
'End With
m_oToc.IsLoadin g = False
End If
BuildLayersStri ngs()
doMapContext()
doZoomLayerCont ext()
doCBOLayersDrop Down()
End Sub
Public Function CheckiMapTool(B yVal toolName As String) As Boolean
Implements Managers.IGUIMg r.CheckiMapTool
' Implement this before doing any plugins
End Function
Public Sub DocPlugin(ByVal frm As System.Windows. Forms.Form) Implements
Managers.IGUIMg r.DocPlugin
End Sub
Public Function GetiMapForm() As System.Windows. Forms.Form Implements
Managers.IGUIMg r.GetiMapForm
End Function
Public Function UnCheckAlliMapT ools() As Boolean Implements
Managers.IGUIMg r.UnCheckAlliMa pTools
End Function
Public Sub doHistoricPhoto s()
Dim ATLStrings As StringsLX
Dim cLink As CLinkedList
Dim abTool As DataDynamics.Sh arpUI.Toolbars. Tool
Dim bnd As DataDynamics.Sh arpUI.Toolbars. Band
Dim i As Short
Dim cFld As CField
Dim s As String
Dim pic As System.Drawing. Image
pic = mSharpTBM.Comma nds("miVOrthos" ).Image()
mSharpTBM.Bands ("mbMain").Tool s("mbiMVOrthos" ).Visible = False
ATLStrings = New StringsLX(True, True)
bnd = mSharpTBM.Bands .Item("mnuHisto ric")
bnd.Tools.Clear ()
For Each cLink In m_cImageMgr.Ort hoImageResoluti ons
ATLStrings.Add( cLink.Key)
Next cLink
' Get the highest tool id in the View category
'For Each abTool In mSharpTBM.Bands .Item("mnuView" ).Tools
' With abTool
' ' If (.ID Mod 700) < 100 Then
' If .ID > iToolCount Then
' iToolCount = .ID
' End If
' ' End If
' End With
'Next abTool
'abTool = Nothing
'frmMain.DefIns tance.HistoricT oolIDMin = iToolCount + 1
If m_ccolViewTools Is Nothing Then
m_ccolViewTools = New CCCollection
End If
' PrintAllTools App.Path & "\AllTools.txt" , m_oActiveBar, "Before Adding
Photos", False
Dim cmd As DataDynamics.Sh arpUI.Toolbars. Command
bnd = mSharpTBM.Bands ("miVOrthos" )
Dim td As ToolDefine
td.sTooltype = SharpUIUtilitie s.ToolType.eBut tonTool
With ATLStrings
For i = 0 To .Count - 1
cmd = New DataDynamics.Sh arpUI.Toolbars. Command("cmd" & .Item(i), "View")
cFld = New CField
' Add the tool
With abTool
s = LCase(.Name)
If s <> "current" And Left(s, 1) <> "2" Then
s = "19" & .Name & " year photos"
ElseIf Left(s, 1) = "2" Then
s = .Name & " year photos"
Else
s = .Name & " year photos"
End If
abTool = AddTool(s, ATLStrings(i), td, cmd, bnd)
cmd.Text = s
If s <> "current" And s <> "2000" Then
cmd.Tooltip = "Displays 19" & .Name & " Year photos"
Else
cmd.Description = "Displays " & .Name & " Year photos"
cmd.Tooltip = "Displays " & .Name & " Year photos"
End If
With cFld
..Name = abTool.Name
'.Value = abTool.ID
End With
End With
' Insert the tool on the Historic photos band
abTool.Image = pic
mSharpTBM.Bands .Item("mnuHisto ric").Tools.Add (abTool)
m_ccolViewTools .Add(cFld.Name, cFld)
cFld = Nothing
Next i
'frmMain.DefIns tance.HistoricT oolIDMax = iToolCount
End With
' PrintAllTools App.Path & "\AllTools.txt" , m_oActiveBar, "After Adding
Photos"
ATLStrings = Nothing
cLink = Nothing
abTool = Nothing
cFld = Nothing
pic = Nothing
End Sub
Public Sub doMapContext()
' Adds the tools to the map context dropdown
' Steve Long 8/28/2000
'--------------------------------------------
Dim oTool As DataDynamics.Sh arpUI.Toolbars. Tool
Dim oBand As DataDynamics.Sh arpUI.Toolbars. Band
Dim i As Short
Dim s As String
' Dim lyr As MapObjects2.Map Layer
oBand = mSharpTBM.Bands .Item("popMapCo ntext")
oBand.Tools.Cle ar()
' For Each lyr In m_oMap.Layers
' WHEN TOC IS REDEVELOPED, WE WILL GET THIS INFORMATION ABOUT WHETHER
' TO INCLUDE THE LAYER FROM IT.
For i = 0 To m_oLayersString s.Count - 1
' If LCase(Left(lyr. Name, 3)) <> "txt" And LCase(Left(lyr. Name, 5)) <>
"image" Then
s = m_oLayersString s.Item(i)
oTool = New DataDynamics.Sh arpUI.Toolbars. ButtonTool
oTool.Text = s
oBand.Tools.Add (oTool)
Next i
End Sub
Public Sub doMapTips(Optio nal ByVal LayerName As String = "", _
Optional ByVal FieldName As String = "", _
Optional ByRef Visible As Boolean = True)
Dim clyr As CLyrAttribute
If Not Visible Then
m_cMapTips.Visi ble = False
Return
End If
Dim sLayer, sField As String
clyr = CType(m_oToc.La yerAttributes.I tem(sLayer),
CCMapTools_Net. CLyrAttribute)
If LayerName = "" Then
sLayer = m_cPrefMgr.MapT ipLayer
If sLayer = "" Then
sLayer = "Taxlots"
sField = "Serial_num "
Else
sField = clyr.LabelField
End If
Else
sLayer = LayerName
If FieldName = "" Then
sField = clyr.LabelField
Else
sField = FieldName
End If
End If
With m_cMapTips
..SetLayer(m_oM ap.Layers.Item( sLayer), sField)
..Visible = True
End With
End Sub
Public Sub doZoomLayerCont ext()
' Adds the tools to the ZoomLayer
' context menu
'--------------------------------
Dim oTool As DataDynamics.Sh arpUI.Toolbars. Tool
Dim oBand As DataDynamics.Sh arpUI.Toolbars. Band
Dim i As Short
Dim s As String
oBand = mSharpTBM.Bands .Item("popZoomL ayer")
oBand.Tools.Cle ar()
For i = 0 To m_oLayersString s.Count - 1
oTool = New DataDynamics.Sh arpUI.Toolbars. ButtonTool
oTool.Text = m_oLayersString s.Item(i)
oBand.Tools.Add (oTool)
Next i
End Sub
Public Sub doMLQDropDown()
Dim bRet As Boolean
Dim oTool As CCSharpUITools. DDButtonTool
Dim oBand As DataDynamics.Sh arpUI.Toolbars. PopupMenu
Dim cmd As DataDynamics.Sh arpUI.Toolbars. Command
Dim i As Short
Dim s As String
If m_ccolMLQs Is Nothing Then
bRet = GetMLQs()
End If
oBand = mSharpTBM.Bands .Item("popMLQCo ntext")
oBand.Tools.Cle ar()

Dim cmlq As CMLQMaps
For Each cmlq In m_ccolMLQs
Try
cmd = mSharpTBM.Comma nds("cmd" & cmlq.MLQName)
Catch ex As Exception
'
End Try
If cmd Is Nothing Then
cmd = New DataDynamics.Sh arpUI.Toolbars. Command("cmd" & cmlq.MLQName,
"Other", cmlq.MLQName)
End If
oTool = New CCSharpUITools. DDButtonTool(cm lq.MLQName)
oTool.Text = cmlq.MLQName
oBand.Tools.Add (oTool)
Next cmlq
End Sub
Public Sub doCBOFieldsDrop Down()
Dim oTool As DataDynamics.Sh arpUI.Toolbars. EditTool
Dim s As String
Dim rsMo As ESRI.MapObjects 2.Core.Recordse t
Dim fld As ESRI.MapObjects 2.Core.Field
Dim i As Integer
oTool = mSharpTBM.Bands .Item("barMapTo ols").Tools.Ite m("tbMcboFields ")
s = mSharpTBM.Bands .Item("barMapTo ols").Tools.Ite m("tbMcboLayers ").Text
rsMo = CType(m_oMap.La yers.Item(s), ESRI.MapObjects 2.Core.MapLayer ).Records
oTool.Items.Cle ar()
For i = 0 To rsMo.Fields.Cou nt - 1
fld = rsMo.Fields.Ite m(i)
oTool.Items.Add (fld.Name)
Next
oTool = Nothing
rsMo = Nothing
fld = Nothing
End Sub
Public Sub doCBOLayersDrop Down()
Dim i As Short
Dim oTool As DataDynamics.Sh arpUI.Toolbars. EditTool
Try
oTool = mSharpTBM.Bands .Item("barMapTo ols").Tools.Ite m("tbMcboLayers ")
Catch ex As Exception
Return
End Try

oTool.Items.Cle ar()
For i = 0 To m_oLayersString s.Count - 1
oTool.Items.Add (m_oLayersStrin gs.Item(i))
Next i
End Sub
Public Function GetPlugIn(ByVal PlugInName As String) As PlugIns.IPlugIn
Try
Return m_ccolPlugIns(P lugInName)
Catch ex As Exception
Return Nothing
End Try
End Function
Public Function IsPlugIn(ByVal PlugInName As String) As Boolean
Dim iPlug As PlugIns.IPlugIn
Try
iPlug = m_ccolPlugIns(P lugInName)
Return True
Catch ex As Exception
Return False
End Try
End Function
Public Function PlugIns(ByRef SymDispMgr As ISymbolDisplayM gr, _
ByRef ParcelSM As IParcelsSelecti onMgr) As Integer
' Gets the available plugins and adds them to the
' plugins collection.
' Function must not be called before other object
' variable have been set.
' 0 = no error
' -1 = No plugins
' 91 = Some object variable not set
' err.number for all other errors
'--------------------------------------------------
Dim sPlugin As String
Dim vArray() As RegGisDLL1.CIte mData
Dim i As Short
Dim abTool As DataDynamics.Sh arpUI.Toolbars. Tool
Dim abMenuTool As DataDynamics.Sh arpUI.Toolbars. Tool
Dim obj As Object
Dim popTool As DataDynamics.Sh arpUI.Toolbars. PopupTool
Dim iPlug As PlugIns.IPlugIn
Dim lABError As Integer
vArray = m_cPrefMgr.GetP lugins()
If vArray.GetUpper Bound(0) > -1 Then
If m_oPlugInString s Is Nothing Then
m_oPlugInString s = New StringsLX(False , True)
End If
With mSharpTBM
popTool = .Bands.Item(MAI N_MENU).Tools(P LUGINS_MENU_NAM E)
If popTool Is Nothing Then
popTool = AddMenu(PLUGINS _MENU_NAME, PLUGINS_MENU_TE XT)
End If
If popTool.SubBand Is Nothing Then
popTool.SubBand = AddMenuItem()
popTool.SubBand .Name = PLUGINS_SUBMENU _NAME
Else
popTool.SubBand .Tools.Clear()
End If
popTool.Text = "Plug-ins"
popTool.Visible = True
End With
Else
Return -1
End If
If m_ccolPlugIns Is Nothing Then
m_ccolPlugIns = New NonComCCCollect ion.CCCollectio n
End If
If m_ccolPlugInsLo aded Is Nothing Then
m_ccolPlugInsLo aded = New NonComCCCollect ion.CCCollectio n
End If
Dim td As ToolDefine
Dim cmd As DataDynamics.Sh arpUI.Toolbars. Command
td.sTooltype = SharpUIUtilitie s.ToolType.eBut tonTool
Dim regdat As String()
For i = 0 To vArray.GetUpper Bound(0)
If lABError = 0 Then
cmd = New DataDynamics.Sh arpUI.Toolbars. Command("cmd" & vArray(i).Item,
"Other", vArray(i).Item)
abTool = AddTool(vArray( i).Item, vArray(i).Item, td, cmd, popTool.SubBand )
cmd.Description = "Enables the " & vArray(i).Item & " plugin"
regdat = ParseRegData(vA rray(i).regData )
abTool.Tag = regdat(1) & "." & regdat(2)
' this next line should be getting done in AddTool
'popTool.SubBan d.Tools.Add(abT ool)
End If
obj = LoadPlugin(regd at(0), regdat(1) & "." & regdat(2))
iPlug = DirectCast(obj, IPlugIn)
If Not iPlug Is Nothing Then
' set all the iPlugin object variables and add obj to the collection
With iPlug
..GUIMgr = Me
..ParcelSelecti onMgr = ParcelSM
..SymbolDisplay Mgr = SymDispMgr
..NavigationMgr = m_cNavMgr
..SpatialQueryM gr = m_cSpatialQry
End With
m_ccolPlugIns.A dd(vArray(i).It em, obj)
m_ccolPlugInsLo aded.Add(vArray (i).Item, vArray(i))
m_oPlugInString s.Add(vArray(i) .Item)
iPlug = Nothing
obj = Nothing
End If
obj = Nothing
Next i
mSharpTBM.Refre sh()
abTool = Nothing
abMenuTool = Nothing
iPlug = Nothing
Return 0
End Function
Public Function ShowOrthos(ByRe f OrthosOn As Boolean) As Boolean
' Turns orthos photos on and off.
Dim reg As RegGisDLL1.RegG IS
If OrthosOn Then
If m_cImageLib Is Nothing Then
m_cImageLib = New CImageLib
reg = g_RegCtl.Reg
With m_cImageLib
..Ortho2Path = reg.Ortho2Path
..Ortho4Path = reg.Ortho4Path
..Ortho10Path = reg.Ortho10Path
..Ortho20Path = reg.Ortho20path
End With
End If
End If
End Function
Private Sub UnCheckOrthos(B yVal commandName As String)
mSharpTBM.Comma nds(commandName ).Checked = False
End Sub
Public Sub UnDocControl(By Ref toolWindow As
DataDynamics.Sh arpUI.Toolbars. ToolWindow, _
ByRef ctl As Windows.Forms.C ontrol)
If toolWindow.Host edControl Is ctl Then
toolWindow.Host edControl = Nothing
End If
End Sub
Public Sub Resize()
'With m_oMap
' .Width = m_oPictBox.Widt h
' .Height = VB6.TwipsToPixe lsY(VB6.PixelsT oTwipsY(m_oPict Box.Height) -
m_iMapBottomBuf fer)
' .Left = 0
' .Top = 0
'End With
'With m_oTab
' .Width = m_oPictBox.Widt h
' .Top = m_oPictBox.Heig ht - 7
'End With
With m_oToc
..MapHeight = m_oMap.Height
..MapWidth = m_oMap.Width
..MapTop = m_oMap.Top
..MapLeft = m_oMap.Left
End With
End Sub
#End Region

#Region "Private Methods"
Private Function OrthosOn(ByRef cFld As CField) As Integer
' Return in cFld the cFld object that contains the
' Tool name and Tool ID.
' Return Values:
' 0 = no error.
' error number for any other error.
' -1 = tool not found.
'--------------------------------------------------
Dim fld As CField
Dim bFound As Boolean = False
With mSharpTBM.Comma nds
For Each fld In m_ccolViewTools
If .Item(CStr(fld. Value)).Checked Then
cFld = fld
bFound = True
Exit For
End If
Next fld
End With
fld = Nothing
If Not bFound Then
Return -1
Else
Return 0
End If
End Function
Private Sub m_cPrefMgr_MapA dded(ByVal MapName As String) Handles
m_cPrefMgr.MapA dded
RaiseEvent NewFavoriteMap( MapName)
End Sub
Private Function GetMLQs() As Boolean
Dim rs As ADODB.Recordset
Dim cData As CDataMgr
Dim bRet As Boolean
Dim sql As String
Dim cMLQ As CMLQMaps
If m_ccolMLQs Is Nothing Then
cData = New CDataMgr
bRet = cData.OpenDB(Ap plication.Start upPath & "\sql2K.mdb ")
If bRet Then
m_ccolMLQs = New CCCollection
sql = "SELECT M.MLQName, M.MLQMap, L.LegendName FROM MLQs AS M, " & _
"MLQLayers AS L WHERE M.BaseLayer = L.LID"
rs = New ADODB.Recordset Class
rs.Open(sql, cData.DB, CursorTypeEnum. adOpenStatic,
LockTypeEnum.ad LockReadOnly, ADODB.CommandTy peEnum.adCmdTex t)
With rs
If Not .EOF And .RecordCount > 0 Then
..MoveFirst()
Do While Not .EOF
cMLQ = New CMLQMaps
cMLQ.MLQName = .Fields("MLQNam e").Value
cMLQ.MLQMap = .Fields("MLQMap ").Value
cMLQ.BaseLayer = .Fields("Legend Name").Value
m_ccolMLQs.Add( cMLQ.MLQName, cMLQ)
..MoveNext()
Loop
End If
End With
End If
End If
Return True
End Function
Private Sub BuildLayersStri ngs()
Dim lyr As ESRI.MapObjects 2.Core.MapLayer
Dim i As Integer
If m_oLayersString s Is Nothing Then
m_oLayersString s = New StringsLX(True, True)
Else
m_oLayersString s.Clear()
End If
For i = 0 To m_oMap.Layers.C ount - 1
lyr = m_oMap.Layers.I tem(i)
If LCase(Left(lyr. Name, 3)) <> "txt" And LCase(Left(lyr. Name, 5)) <> "image"
Then
m_oLayersString s.Add(lyr.Name)
End If
Next
' WHEN TOC IS REDEVELOPED, WE WILL GET THIS INFORMATION ABOUT WHETHER
' TO INCLUDE THE LAYER FROM IT.
End Sub
Private Sub ResizeMap(ByRef Height As Integer, ByRef Width As Integer)
With m_oMap
..Width = Width 'VB6.TwipsToPix elsX(Width)
..Height = .Height 'VB6.TwipsToPix elsY(Height)
..Left = 0
..Top = 0
End With
End Sub
Private Sub Init()
m_iResize_Inter val = 50
m_iMapBottomBuf fer = 350
m_cPrefMgr = New CPreferencesMgr
m_cPrefMgr.GetP references()
m_cMapTips = New CMaptips
GetMLQs()
End Sub
Private Sub LoadMenu()
' Figure this out later
End Sub
#End Region

#Region "Reflection for Plugins"
Private Function LoadPlugin(ByVa l assemblyName As String, ByVal createName
As String, _
Optional ByVal assemVersion As String = "") As Object
Dim a As System.Reflecti on.Assembly
Dim tp As Type
Dim ass As String
If assemVersion = "" Then
ass = assemblyName & ", Version=" & assemVersion & ", Culture=nuetral ,
PublicKeyToken= null"
Else
ass = assemblyName
End If
Try
a = [Assembly].Load(ass)
Catch ex As Exception
Return Nothing
End Try
If Not tp Is Nothing Then
tp = a.GetType(creat eName)
a = Nothing
Return tp
Else
a = Nothing
Return Nothing
End If
End Function
Private Function ParseRegData(By Val obj As Object) As String()
If TypeOf obj Is String Then
Dim s As String = CType(obj, String)
Dim ipos As Integer
Dim chr(1) As Char
chr(0) = "."
Return s.Split(chr, 4)
End If
End Function
#End Region

#Region "Private Plugin support"
Private Sub PlugIn_AddParce l(ByVal sn As Double)
Dim iPlug As PlugIns.IPlugIn
Dim dicEntry As DictionaryEntry
For Each dicEntry In m_ccolPlugIns
iPlug = dicEntry.Value
iPlug.AddParcel (sn)
Next dicEntry
iPlug = Nothing
End Sub
Private Sub PlugIn_ClearSel ectedFeatures()
Dim iPlug As PlugIns.IPlugIn
Dim dicEntry As DictionaryEntry
For Each dicEntry In m_ccolPlugIns
iPlug = dicEntry.Value
iPlug.ClearSele ctedFeatures()
Next dicEntry
iPlug = Nothing
End Sub
Private Sub PlugIn_ClearSel ectedParcels()
Dim iPlug As PlugIns.IPlugIn
Dim dicEntry As DictionaryEntry
For Each dicEntry In m_ccolPlugIns
iPlug = dicEntry.Value
iPlug.ClearSele ctedParcels()
Next dicEntry
iPlug = Nothing
End Sub
Private Sub PlugIn_FeatureS elected(ByVal feature As PlugIns.IFeatur e)
Dim iPlug As PlugIns.IPlugIn
Dim dicEntry As DictionaryEntry
For Each dicEntry In m_ccolPlugIns
iPlug = dicEntry.Value
iPlug.FeatureSe lected(feature)
Next dicEntry
iPlug = Nothing
End Sub
Private Sub PlugIn_FeatureS etSelected(ByVa l features() As PlugIns.IFeatur e)
Dim iPlug As PlugIns.IPlugIn
Dim dicEntry As DictionaryEntry
For Each dicEntry In m_ccolPlugIns
iPlug = dicEntry.Value
iPlug.FeatureSe tSelected(featu res)
Next
iPlug = Nothing
End Sub
Private Sub PlugIn_MapAdded (ByVal MapName As String)
Dim iPlug As PlugIns.IPlugIn
Dim dicEntry As DictionaryEntry
For Each dicEntry In m_ccolPlugIns
iPlug = dicEntry.Value
iPlug.MapAdded( MapName)
Next
iPlug = Nothing
End Sub
Private Sub PlugIn_NewIdent ity(ByVal LayerName As String, Optional ByRef
AddTo As Boolean = False)
Dim iPlug As PlugIns.IPlugIn
Dim dicEntry As DictionaryEntry
For Each dicEntry In m_ccolPlugIns
iPlug = dicEntry.Value
iPlug.NewIdenti fy(LayerName, AddTo)
iPlug.LayerIden tify(LayerName, 0)
Next
iPlug = Nothing
End Sub
Private Sub PlugIn_NewMaili ng(ByVal LayerName As String)
Dim iPlug As PlugIns.IPlugIn
Dim dicEntry As DictionaryEntry
For Each dicEntry In m_ccolPlugIns
iPlug = dicEntry.Value
iPlug.NewMailin g(LayerName)
Next
iPlug = Nothing
End Sub
Private Sub PlugIn_NewMLQ(B yRef pnt As ESRI.MapObjects 2.Core.Point)
Dim iPlug As PlugIns.IPlugIn
Dim dicEntry As DictionaryEntry
For Each dicEntry In m_ccolPlugIns
iPlug = dicEntry.Value
iPlug.NewMLQ(pn t)
Next
iPlug = Nothing
End Sub
Private Sub PlugIn_ParcelSe tSelected(ByRef SNs As Double())
Dim iPlug As PlugIns.IPlugIn
Dim dicEntry As DictionaryEntry
For Each dicEntry In m_ccolPlugIns
iPlug = dicEntry.Value
iPlug.ParcelSet Selected(SNs)
Next
iPlug = Nothing
End Sub
Private Sub PlugIn_ReleaseM oSelect()
Dim iPlug As PlugIns.IPlugIn
Dim dicEntry As DictionaryEntry
For Each dicEntry In m_ccolPlugIns
iPlug = dicEntry.Value
iPlug.ReleaseMo Select()
Next
iPlug = Nothing
End Sub
Private Sub PlugIn_RemovePa rcel(ByVal SN As Double)
Dim iPlug As PlugIns.IPlugIn
Dim dicEntry As DictionaryEntry
For Each dicEntry In m_ccolPlugIns
iPlug = dicEntry.Value
iPlug.RemovePar cel(SN)
Next
iPlug = Nothing
End Sub
Private Sub PlugIn_SetSubje ct(ByVal SN As Double)
Dim iPlug As PlugIns.IPlugIn
Dim dicEntry As DictionaryEntry
For Each dicEntry In m_ccolPlugIns
iPlug = dicEntry.Value
iPlug.ParcelSel ected(SN)
Next
iPlug = Nothing
End Sub
#End Region

#Region "Event Handlers"
Private Sub MLQEventHandler (ByVal sender As Object, ByVal e As
CCSharpUITools. ToolEventArgs)
End Sub
#End Region
End Class
"Greg Young" <gr********@pla netbeach.com> wrote in message
news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..
This is not helpful. It's never getting to the line of code that seems to
be
causing a problem. I'm instantiating an object in the Form.Load event
and if
I comment that line of code out, all is well. However, if I leave that line
of code in, none of the code in the Form.Load event ever occurs. The

best message I get is:
System.TypeLoad Exception: Signature of the body and declaration in a

method
implementation do not match. Type: iMap.GUIMgr. Assembly: iMap,
Version=1.0.163 4.22071, Culture=neutral , PublicKeyToken= null.


sounds like there is an issue with the loading of the type ...
Additionally,
I added a handler for the System.Windows. Forms.Applicati on.ThreadExcept ion event to try and trap this error and I get the same message as I just

listed
above. I get nothing helpful here. If the CLR can detect an error, why

am I
not taken to the offending line of code so I can fix it? I have looked
through the GUIMgr code and don't see anything obvious. I have looked at the
interfaces it implements and also don't see anything obvious. So, is

there a
way to make the IDE stop throwing up this dumb Exception dialog and take

me
to the error?


The CLR is taking you to the line of code ... it is failing loading the
type.

Can you put up the code for the type ?

Nov 20 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1738
by: Bevo | last post by:
a) My cMyMainForm throws an unhandled exception (in my case a third party component throws a SEHException when hovering the mouse pointer over it). I want to display my own dialog box instead of .NET's and take the system down gracefully. b) I've tried the UnhandledException event but I cant find any functionality that allows me to suppress the exception dialog, in fact the exception dialog is displayed BEFORE the event is fired.
1
1443
by: steve bull | last post by:
I created a dialog box which runs fine when I call Show() but gives the following unhandled exception when I call ShowDialog(). It crashes when exiting from the menu item callback that invoked it. An unhandled exception of type 'System.Runtime.InteropServices.SEHException' occurred in system.windows.forms.dll Additional information: External component has thrown an exception.
6
1717
by: Nick Reeves | last post by:
While developing the below code I noticed that exceptions were not working as expected. An exception is thrown inside an XML import DLL and not being caught inside the Main() code fragment, creating an unhandled exception inside "theUI". Would anybody know why this is happening? I thought the general rule for exceptions handling was the exception is passed up the stack until the application handles it or the program terminates? ...
2
1327
by: Nak | last post by:
Hi there, I'm just curious as to something. I have just added an exception handler at the entry point to my application, within the IDE any unhandled exceptions fallback to this and enable me to disable a dialog of my liking. Now if I run the application outside of the IDE I recieve the standard "Unhandled exception" dialog provided by .NET giving me the ability to continue or quit. I wasn't actually aware that exception handling...
6
1799
by: Robin Riley | last post by:
Hi, I have a .NET solution that contains a dll project and a tester application project which, of course, invokes the dll. The dll project has exception handling in it. What's happening is that when I run the executable from within the .NET studio environment, thrown exceptions are caught and handled correctly (both debug and release mode). However, if I run the executable from outside the .NET studio, none of the exceptions get caught....
15
2348
by: Mark Lewis | last post by:
I have a weird error trapping problem. When running the IDE everything works fine but not when running in an EXE I get the Unhandled Exception Error message box intead of the one in my Try....Catch Block. To see this create a simple application with two forms. Form 1 should have one button. The code is follows. Run this in the IDE and observe the error and then compare that behavior to what happens when you run the built EXE. Has...
5
3835
by: Bry | last post by:
I've created a class that offers an enhanced way of handling fatal exceptions. The class allows the user to optionaly submit a http based anonymous error report to myself, and also records details in the application log. The static method is overloaded, and supports passing exceptions and/or strings just like throwing an exception.The class will also fall back to the standard exception handling if something goes wrong in my class. As an...
14
1520
by: Rex | last post by:
Re: Looking for Tips/Writeup on overall approach to Exception Processing Hi All - I am fairly new to C# and am wondering how to best implement (overall) Exception Processing within my (reasonably-sized) C# Windows application. I do have a bunch of somewhat random questions on this and if you can help me with only one or a few, that would still be APPRECIATED. Here are my questions: 1. Is it recommended to put all of the "Main" coding...
1
5892
Shashi Sadasivan
by: Shashi Sadasivan | last post by:
Hi all, I have got my windows app to handled any UI or unhandled exceptions. following is the code static class Program { /// <summary> /// The main entry point for the application. /// </summary>
0
9843
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10881
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10575
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10628
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10275
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7807
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7004
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5850
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4043
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.