1
VB and the development of wizards / Re: Using the COM API in VB .NET
« on: March 04, 2010, 02:13:54 PM »
I still need some help figuring out how to activate the buttons through the ActiveX Server.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Module Module1
Function Main() As Integer
Dim GCodeCommand As String
Dim Mach As Mach4.IMach4
Dim ScriptObject As Mach4.IMyScriptObject
Dim ReturnCode As Integer
ReturnCode = 0
GCodeCommand = ""
For Each Argument As String In My.Application.CommandLineArgs
GCodeCommand = GCodeCommand + Argument + " "
Next
If (GCodeCommand <> "") Then
Try
Mach = GetObject(, "Mach4.Document")
ScriptObject = Mach.GetScriptDispatch()
ScriptObject.Code(GCodeCommand)
Catch
ReturnCode = -2
End Try
Else
ReturnCode = -1
End If
Return ReturnCode
End Function
End Module