PC Review


Reply
Thread Tools Rate Thread

CreateObject - how to ???

 
 
=?Utf-8?B?SmFyb2Q=?=
Guest
Posts: n/a
 
      19th Mar 2005
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
 
Reply With Quote
 
 
 
 
Alexander Shirshov
Guest
Posts: n/a
 
      20th Mar 2005
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

"Jarod" <(E-Mail Removed)> wrote in message
news:1E7FC2ED-2295-4645-A2F9-(E-Mail Removed)...
> 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



 
Reply With Quote
 
QWERTY
Guest
Posts: n/a
 
      20th Mar 2005
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.


On Sun, 20 Mar 2005 11:40:09 +0700, "Alexander Shirshov"
<(E-Mail Removed)> wrote:

>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
>
>"Jarod" <(E-Mail Removed)> wrote in message
>news:1E7FC2ED-2295-4645-A2F9-(E-Mail Removed)...
>> 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

>


 
Reply With Quote
 
Alexander Shirshov
Guest
Posts: n/a
 
      20th Mar 2005
Sorry, I meant "ApplicationClass", i.e.

GeoMedia.Application = new GeoMedia.ApplicationClass();

Alexander

"Alexander Shirshov" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>
> "Jarod" <(E-Mail Removed)> wrote in message
> news:1E7FC2ED-2295-4645-A2F9-(E-Mail Removed)...
>> 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

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CreateObject vs New dR Microsoft Powerpoint 4 2nd Mar 2008 09:27 PM
CreateObject Anna Microsoft VB .NET 2 4th Jan 2007 11:38 AM
CreateObject vs New Eric Brooksby Microsoft ASP .NET 2 29th Oct 2004 02:29 PM
CREATEOBJECT Using VB Karthik Microsoft Excel Programming 2 16th Jun 2004 09:08 PM
if in asp is CreateObject("Microsoft.XMLHTTP"). Is in asp.net this Server.CreateObject("MSXML2.ServerXMLHTTP") ? Raúl Martín Microsoft ASP .NET 1 13th May 2004 04:47 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:45 AM.