Yes. Both machines have the same framework. Here is my code.
Imports System.Runtime.InteropServices
Imports System.Windows.Forms
Imports System.Drawing
Imports System.IO
Imports System.Text
Imports ESRI.ArcObjects.Core
Imports ESRI.ArcObjects.Samples.BaseClasses
Imports ESRI.ArcObjects.Samples.CatIDs
<ComClass(AirphotoLoad.ClassId, AirphotoLoad.InterfaceId, AirphotoLoad.EventsId)> _
Public NotInheritable Class AirphotoLoad
Inherits BaseCommand
#Region "COM GUIDs"
Public Const ClassId As String = "1A0A82AA-5748-4C4E-845D-43CD01A13E67"
Public Const InterfaceId As String = "D7FADFE2-077C-453C-9A67-AA16BC8B5F23"
Public Const EventsId As String = "1807E736-85BB-47D2-A2CB-75462E685E4E"
#End Region
#Region "Register Unregister Component"
<ComRegisterFunction(), ComVisible(False)> _
Public Shared Sub OnRegister(ByVal regKey As String)
MxCommand.Register(regKey)
End Sub
<ComUnregisterFunction(), ComVisible(False)> _
Public Shared Sub OnUnRegister(ByVal regKey As String)
MxCommand.Unregister(regKey)
End Sub
#End Region
Private m_app As IApplication
Public Sub New()
MyBase.New()
m_caption = "Caption Description"
m_category = "Tool Category"
m_message = "Sample Tool Message"
m_name = "ToolName"
m_tooltip = "Sample Tool tip"
m_bitmap = New Bitmap(Me.GetType.Assembly.GetManifestResourceStream("ESRISamples.happy2.bmp"))
End Sub
Public Overrides Sub OnClick()
' Add some code to do some action when the command is clicked. In this
' example, a message box is displayed.
ButtonClick()
End Sub
Public Overrides Sub OnCreate(ByVal hook As Object)
If TypeOf hook Is IMxApplication Then
m_app = hook
End If
End Sub
Public Overrides ReadOnly Property Enabled() As Boolean
Get
' Add some logic here to specify in what state the application
' should be in for the command to be enabled. In this example,
' the command is enabled only when there is at least one data
' layer loaded in ArcMap.
Dim mxDoc As IMxDocument
Dim layerCount As Integer
mxDoc = m_app.Document
layerCount = mxDoc.FocusMap.LayerCount
If layerCount > 0 Then
Enabled = True
Else
Enabled = False
End If
End Get
End Property
Public Overrides ReadOnly Property Checked() As Boolean
Get
End Get
End Property
End Class
Public Sub ButtonClick()
msgbox ("buttonCLicked")
End Sub