CreateObject - how to ???

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hey
I have something like this in VB6:

Dim objApp As Object
Set objApp = CreateObject("Geomedia.Application")
objApp.Visible = True

I need to do this in C#. I have referenced appropriate library so I have
access to GeoMedia.Application. But the VS 2003 shows me it's not a class
it's an interface is it ok ? In documentation I found out that this
Application is a class. I tried to use Activator class and CreateInstance
function but... maybe in wrong way.. ? When I try:
Type tp = System.Type.GetType("GeoMedia.Application");
tp stays null. Could tell me how to create this object...
Jarod
 
Jarod,

Is there (in Object Browser and in IntelliSense popup lists) something like
GeoMedia.Application class? If there is, you should create an instance of
it.

HTH,
Alexander
 
You can use the same CreateObject method in c#, just make a reference
to one of the VB library. can't remember which one, you have to check
to see which library that method belongs to.
 
Sorry, I meant "ApplicationClass", i.e.

GeoMedia.Application = new GeoMedia.ApplicationClass();

Alexander
 
Back
Top