hexagon logo

Program to Open PC-DMIS

I am currently attempting to write a program (VB.NET) that will have a PC-DMIS program's file name passed to it. This program should then start PC-DMIS if it isn't already running, and open the program that was passed to it. If PC-Dmis is already running, then it should open the program that was passed to it. Then, the program should close, leaving PC-DMIS running. I also want PCDMIS to be opened as Operator Mode.

I am attempting to do this by referncing PCDLRN within the program. Hwoever, I am having little luck with the .OperatorMode=true method.

The reason I am attempting to do this in VB.NET is I will then follow up with some additional programming (saving info to a DB and what not) that would be cumbersome as a .VBS etc.

This PCDMIS 2011 MR1 and VB.NET 2010 (.NET 4.0)

Imports System.IO


Public Class Form1

    Public PCDApp As PCDLRN.Application
    Public PCDPartPrograms As Object
    Public PCDPartProgram As Object

    Public fileName As String = "C:\Work\31580 - 1 - 12345.PRG"


    Private Sub Application_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load

        If File.GetAttributes(fileName) = FileAttributes.ReadOnly Then
            File.SetAttributes(fileName, FileAttributes.Normal)
        End If

        StartApplication(fileName)

    End Sub ' Application_Load



    Public Sub StartApplication(ByVal _fileName As String)

        PCDApp = CreateObject("PCDLRN.Application")
        PCDPartPrograms = PCDApp.PartPrograms

        PCDApp.Visible = True
        PCDPartPrograms.Open(_fileName, "CMM1")

    End Sub


End Class
Parents
  • Start Me Up
    Start Me Up lyricsSongwriters: Jagger, Mick; Richards, Keith;


    If you start me up
    If you start me up I'll never stop
    If you start me up
    If you start me up I'll never stop


    I've been running hot
    You got me ticking gonna blow my top
    If you start me up
    If you start me up I'll never stop
    Never stop, never stop, never stop


    You make a grown man cry
    You make a grown man cry
    You make a grown man cry
    Spread out the oil, the gasoline
    I walk smooth, ride in a mean, mean machine
    Start it up


    If you start it up
    Kick on the starter give it all you got, you got, you got
    I can't compete with the riders in the other heats
    If you rough it up
    If you like it you can slide it up
    Slide it up, slide it up, slide it up


    Don't make a grown man cry
    Don't make a grown man cry
    Don't make a grown man cry
    My eyes dilate, my lips go green
    My hands are greasy, she's a mean, mean machine
    Start it up


    Start me up
    Give it all you got
    You got to never, never, never stop
    Slide it up, baby just slide it up
    Slide it up, slide it up, never, never, never


    You make a grown man cry
    You make a grown man cry
    You make a grown man cry
    Ride like the wind at double speed
    I'll take you places that you've never, never seen


    Start it up
    Love the day when we'll never stop, never stop
    Never, never, never stop
    Tough me up
    Never stop, never stop


    You, you, you make a grown man cry
    You, you make a dead man come
    You, you make a dead man come


Reply
  • Start Me Up
    Start Me Up lyricsSongwriters: Jagger, Mick; Richards, Keith;


    If you start me up
    If you start me up I'll never stop
    If you start me up
    If you start me up I'll never stop


    I've been running hot
    You got me ticking gonna blow my top
    If you start me up
    If you start me up I'll never stop
    Never stop, never stop, never stop


    You make a grown man cry
    You make a grown man cry
    You make a grown man cry
    Spread out the oil, the gasoline
    I walk smooth, ride in a mean, mean machine
    Start it up


    If you start it up
    Kick on the starter give it all you got, you got, you got
    I can't compete with the riders in the other heats
    If you rough it up
    If you like it you can slide it up
    Slide it up, slide it up, slide it up


    Don't make a grown man cry
    Don't make a grown man cry
    Don't make a grown man cry
    My eyes dilate, my lips go green
    My hands are greasy, she's a mean, mean machine
    Start it up


    Start me up
    Give it all you got
    You got to never, never, never stop
    Slide it up, baby just slide it up
    Slide it up, slide it up, never, never, never


    You make a grown man cry
    You make a grown man cry
    You make a grown man cry
    Ride like the wind at double speed
    I'll take you places that you've never, never seen


    Start it up
    Love the day when we'll never stop, never stop
    Never, never, never stop
    Tough me up
    Never stop, never stop


    You, you, you make a grown man cry
    You, you make a dead man come
    You, you make a dead man come


Children
No Data