OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Developer Forums > VBA > Corel Photo-Paint VBA

Thread Tools Search this Thread Display Modes
Old 11-01-2007, 08:00
Posts: n/a
Default getobject PP12 VB.Net

The getobject method in the sequence below always throw an exeption even if an instance of PP12 is running. Why ?

Dim CPT as PHOTOPAINT.Application
CPT = GetObject("", "PHOTOPAINT.Application")
Catch ex As Exception
CPT = New PHOTOPAINT.Application
End Try
Reply With Quote
Old 11-01-2007, 13:20
Alex's Avatar
Alex Alex is offline
Join Date: Nov 2002
Posts: 1,940
Blog Entries: 4

You shouldn't use GetObject. Creating a new instance of Application object in both CorelDRAW and Photo-Paint connects to the running instance of the application or starts it if not already running. So you will not launch another copy of the application.

So, either use CreateObject or use the New keyword on the application class.
Reply With Quote
Old 11-01-2007, 22:21
Posts: n/a

Thank you !
Reply With Quote

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
VB.net: How to add a commandbar in PP12 Quincy Corel Photo-Paint VBA 2 07-01-2007 10:27
PP12, MS Access, and VBA dvlee Corel Photo-Paint VBA 3 29-12-2006 16:41
Run macro from VB.Net 2005 jabky CorelDRAW/Corel DESIGNER VBA 4 04-07-2006 22:37
Automated movie generation in PP12 Paul Rowntree Corel Photo-Paint VBA 2 13-07-2005 14:02
Problem customizing context menus in PP12 Anonymous General 0 26-09-2004 18:55

All times are GMT -5. The time now is 00:32.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright © 2011, Oberonplace.com