Showing results 1 to 2 of 2

Thread: how open vipwin from visual basic?

  1. #1
    draganchem Gast

    Default how open vipwin from visual basic?

    I want to open some vipwin project from visual basic and start it. How can I do that?

  2. #2
    Join Date

    Default Re: how open vipwin from visual basic?

    If you want that an external Visual Basic application (like VB6, Visual Basic 2005,.... ) should establish a connection to a already running runtime it would look something like this:

    Dim obAppRT As zenOn.Application
    Dim WithEvents obProjectRT As zenOn.Project
    Sub checkConnectionZenOn()
        On Error GoTo errorhandler
        'set Application object (zenOn Runtime)...
        If obAppRT Is Nothing Then
            Set obAppRT = GetObject(, "zenOn.Application")
        End If
        Debug.Print ("Connected to zenOn Runtime")
        'set Project object (first in list or defined by name)...
        Set obProjectRT = obAppRT.Projects.Item(0) 'first project in list...
        'Debug.Print obProjectRT.Name
        'set Project object (by name) ...
        'Set obProjectRT = obAppRT.Projects.Item("MYTESTS")
        'Debug.Print obProjectRT.Name
        If obProjectRT Is Nothing Then
            Debug.Print ("Project is not reachable!")
            Exit Sub
        End If
        Debug.Print ("Project available: " & obProjectRT.Name)
        If obProjectRT.Variables.Count = 0 Then
            Debug.Print ("No Variables within the Project!")
            Exit Sub
        End If
        Debug.Print ("Variables are available")
        If Err.Number <> 0 Then
            If (Err.Number = 429 Or obAppRT Is Nothing) Then
                '-->"Error creating ActiveX-control
                Debug.Print ("zenOn Runtime is not reachable!")
                Debug.Print (Err.Number & " " & Err.Description)
            End If
        End If
    End Sub

    Note: you have to insert the zenon32.tlb to the references

    If you simply want to start the runtime via VB6 you would have to execute the process zenrt32.exe


Similar Threads

  1. Microsoft Visual C++ Runtime Library Error
    By douglasm in forum VSTA
    Replies: 5
    Last Post: 5th April 2019, 06:54
  2. basic mathematics in report generator
    By affoltep in forum zenon Supervisor
    Replies: 3
    Last Post: 5th March 2010, 08:40
  3. Name of curretly open picture
    By scotttee in forum VBA
    Replies: 5
    Last Post: 4th January 2010, 23:58
  4. Open database error
    By jan1024 in forum zenon Supervisor
    Replies: 13
    Last Post: 30th November 2009, 16:11
  5. display last open picture
    By dak2483 in forum zenon Operator
    Replies: 3
    Last Post: 5th September 2008, 18:57

Posting Rules

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts