AnsweredAssumed Answered

Form open two times on PROJECTCHANGED Event

Question asked by nicola.fiorucci on Jun 5, 2015

Hi,  i setted up a vbs script to run on Dxdesigner startup. The vbs script open a form (Myform) on ProjectChanged event. When i click on recent project on Dxesigner Welcome page Myform is opened two times.

 

Why??

 

Option Explicit

 

Dim dxdApp

Set dxdApp = Application

 

'Scripting.AddTypeLibrary("ViewDraw.Application")

 

Scripting.AttachEvents Application, "App"

 

Scripting.DontExit = True

 

Sub App_ProjectChanged(prjData)

   

    Dim fileName

    Dim cmdMgr

 

    Set cmdMgr = Application.CommandsManager

fileName = "T:\Myform.efm"

    Call cmdMgr.ExecuteCommand("form " +fileName)

End Sub

Outcomes