473,387 Members | 1,502 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

CreateObject - how to ???

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
Nov 16 '05 #1
3 2038
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" <Ja***@discussions.microsoft.com> wrote in message
news:1E**********************************@microsof t.com...
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

Nov 16 '05 #2
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"
<al*******@omnitalented.com> 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" <Ja***@discussions.microsoft.com> wrote in message
news:1E**********************************@microso ft.com...
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


Nov 16 '05 #3
Sorry, I meant "ApplicationClass", i.e.

GeoMedia.Application = new GeoMedia.ApplicationClass();

Alexander

"Alexander Shirshov" <al*******@omnitalented.com> wrote in message
news:uo**************@tk2msftngp13.phx.gbl...
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" <Ja***@discussions.microsoft.com> wrote in message
news:1E**********************************@microsof t.com...
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


Nov 16 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Roland Johann | last post by:
On my Windows Server 2003 Web Edition I have installed an application which offers some OLE Automation Objects. On my local system (W2k Prof) it works fine but on my server 2003 I have a big...
14
by: wk6pack | last post by:
Hi, I'm getting this error on my asp page intermittently. One day it is fine, another day, it crashes a lot. I have searched the web and microsoft on this and they say it is a recordset...
6
by: MacKenzie | last post by:
The statement in an asp page: dim objShell Set objShell = WScript.CreateObject("WScript.Shell") now gives this error: VB err= 424,Object required If I use...
1
by: Raúl Martín | last post by:
I´ve a function in asp that run correctly but If I tried to change it forasp.net in asp: xmlHTTP = CreateObject("Microsoft.XMLHTTP") And I thought to use this sentence for asp.net but the...
12
by: karen | last post by:
Hi all : this is going to be a long post. So i apologize in advance :) i am converting a java program in VB right now. I am a java programmer by trade. so i am no expert in this department. I...
2
by: C Williams | last post by:
Hi, I am having some problems with CreateObject and Powerpoint. I'm working from VB.NET with Powerpoint 2003. The code below is only ever called when powerpoint is already open. It's called...
7
by: dlasusa | last post by:
Sorry if this is the wrong group...I THINK I got to the right place...(oh...and I'm a newbie programmer...so please be gentle) Anyway I have a program that works fine when I run it from within...
0
by: quintesv | last post by:
hi all, Running VS.2003 , framework 1.1. I have a COM object written in Delphi which im trying to call through ASP.NET. The COM object connects to a folder on another machine and opens a...
1
by: Lynn Zou | last post by:
In our system , we use an ASP page to upload files but sometimes it doesnot work as it suppose to do and we found error log in Application Error as: Event Type: Error Event Source: Active...
3
by: Sagar | last post by:
I am working on a project where Server.CreateObject is replaced with CreateObject all over the project. Though I know that this will improve performance in terms of Memory overlhead because of how...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.