So through the process of improving my app for automating pc-dmis I have undertaken the task of converting parts of my app from vbscripts to all C# code. When "interacting" with pc-dmis in previous versions, I would call the vbscripts to automate pc-dmis and wait for the script to finish before doing anything else.
Through converting my code in vbscripts to c# I have come across the problem that I don't know how to handle application events in c#. I am having trouble matching the syntax differences between vbscripts and c#.
The application event in particular i'm looking to handle is the "IsMachineConnected" event during startup of pc-dmis.
So if anyone has an example or input they'd like to share, I would greatly appreciate it.
Here is my working code to launch pc-dmis:
TIA
Through converting my code in vbscripts to c# I have come across the problem that I don't know how to handle application events in c#. I am having trouble matching the syntax differences between vbscripts and c#.
The application event in particular i'm looking to handle is the "IsMachineConnected" event during startup of pc-dmis.
So if anyone has an example or input they'd like to share, I would greatly appreciate it.
Here is my working code to launch pc-dmis:
Code:
Using PCDLRN; public void pcdLaunch() { Type PCDRLN_Application = null; object PCDObj = null; PCDLRN.Application PCDApp = null; try { PCDRLN_Application = Type.GetTypeFromProgID("PCDLRN.Application"); PCDObj = Activator.CreateInstance(PCDRLN_Application); } catch (System.Exception em) { MessageBox.Show(em.Message); } PCDApp = new PCDLRN.Application(); PCDApp.OperatorMode = true; PCDApp.Visible = false; }
Comment