hexagon logo

visual studio

I am struggling with two problems. Hopefully someone can help.
The following code will open pcdmis 2014.1, 32 bit, execute a program and close pcdmis.

1) How can I make pcdmis visible? Seems like "PCDApp.visible = True" doesn't do anything.
2) How can I make the application moveable when pcdmis is running? The application can be moved around the screen before and after pcdmis runs, but not during.

Dim PCDApp, PCDPartPrograms, PCDPartProgram
        PCDApp = CreateObject("PCDLRN.Application")
        PCDApp.visible = True
        PCDPartPrograms = PCDApp.PartPrograms
        PCDPartPrograms.Open("c:\test.PRG", "CMM1")
        PCDPartProgram = PCDApp.ActivePartProgram
        PCDPartProgram.Execute()
        PCDPartProgram.Close()
        PCDApp.Quit()
Parents
  • I don't have an answer to your 1st question. But, I always leave PCDMIS open. Using the same code you have, minus the quit command.

    When you say "application", do you mean the .net application? If so, you can use another thread to launch PCDMIS. That should still give you access to the form. Only problem is, if you plan to update the form via the new thread, you have to deal with marshaling.
Reply
  • I don't have an answer to your 1st question. But, I always leave PCDMIS open. Using the same code you have, minus the quit command.

    When you say "application", do you mean the .net application? If so, you can use another thread to launch PCDMIS. That should still give you access to the form. Only problem is, if you plan to update the form via the new thread, you have to deal with marshaling.
Children
No Data