kjain2000
Dec 3rd, 2001, 05:33 AM
Below is the code which I am using for opening other application in OLE control,which I need to put in one picture-box control.I am not able to figure out how to keep activatio of my application in the ole-container control unless I write a code to close the application.The problem I am having is when I click on some other control the application loses focus and I have to again say doverb.
OLE1.Width = Picture1.Width
OLE1.Height = Picture1.Height
Set swapp = CreateObject("sldworks.application")
OLE1.Class = "sldAssem.document"
OLE1.SourceDoc = "C:\ProgramFiles\SolidWorks\sldworks.exe"
OLE1.CreateEmbed SourceDoc, OLE1.Class
OLE1.DoVerb -1
OLE1.Width = Picture1.Width
OLE1.Height = Picture1.Height
Set swapp = CreateObject("sldworks.application")
OLE1.Class = "sldAssem.document"
OLE1.SourceDoc = "C:\ProgramFiles\SolidWorks\sldworks.exe"
OLE1.CreateEmbed SourceDoc, OLE1.Class
OLE1.DoVerb -1