I am working on adding multi-threading to my application. I have done two applications using multi-threading following a tutorial of sorts, and modifying the code to "get my feet wet."
This is the first time I am trying multi-threading within my own application, and I feel I should be beyond this type of problem, but after a 3 hour search on the forums, I can not find a solution, so I am posting this thread.
The section of code with the errorThe error is:vb.net Code:
Imports System.Threading Imports SldWorks Imports SwConst Imports System Imports System.Windows.Forms Imports System.Globalization Imports System.Object Imports System.Math Public Parent As GCode Public Sub Initialize(ByVal oParent As Object) 'oGCode = oParent Parent = oParent . . . bResults = Parent.invoke(Parent.cSetTransform, swMathTransform) End Sub
Error 1 'invoke' is not a member of 'ToyodaMill.GCode'.
the Gcode class is as follows:Please helpvb.net Code:
Imports System.Threading Imports SldWorks Imports System.IO Imports System.Text Public Class GCode ReadOnly oTransformLock As New Object Dim swTransform As MathTransform Dim sTransformName As String Delegate Function dSetTransform(ByVal Transform As SldWorks.MathTransform) Public cSetTransform As dSetTransform Public Function SetTransform(ByVal Transform As SldWorks.MathTransform) As Boolean Monitor.Enter(oTransformLock) SetTransform = True Try swTransform = Transform Catch ex As Exception SetTransform = False Finally Monitor.Exit(oTransformLock) End Try End Function




Reply With Quote