I have written a project which has common functions in Visual Basic 2010 i.e. Visual Studio 2010. for e.g.
Public Function FlashPolygon(pDisplay As IScreenDisplay, pGeometry As IGeometry) Dim pFillSymbol As ISimpleFillSymbol Dim pSymbol As ISymbol Dim pRGBcolor As IRgbColor ' Set the Actions based on Error Mode If DEBUG_MODE = 0 Then On Error GoTo FlashPolygon_Error If DEBUG_MODE = 2 Then On Error Resume Next pFillSymbol = New SimpleFillSymbol pFillSymbol.Outline = Nothing pRGBcolor = New RgbColor pRGBcolor.Green = 128 pSymbol = pFillSymbol pSymbol.ROP2 = esriRasterOpCode.esriROPNotXOrPen pDisplay.SetSymbol(pFillSymbol) pDisplay.DrawPolygon(pGeometry) Sleep(300) pDisplay.DrawPolygon(pGeometry) On Error GoTo 0 Exit Function
I want to access this function in a form in another project. I have already added reference to the commonfunctions project. But i am getting error Reference to a non-shared member requires an object reference.
Can someone help with what mistake I am doing in this code?