473,803 Members | 4,391 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Assign object to running windows program

AP
Hello, I am having trouble trying to assign an object to a running program
in windows in VB.NET
A COM component class with the same name as the windows program is avaliable
to use
in VB.NET.
The component doesnt have an actual icon that you can drag on to a form, you
can only access the class.
Is there anyway to create an instance of this class and assign it to a
running instance within a running windows program?
Do I need to FindWindow() API call to assign the window to my object?
Or do I need to do something completly different like create a COM program.
Hope this is not too confusing.

Hope someone can help

--
AP

Nov 21 '05 #1
6 1485
AP,
Hope this is not too confusing.


I assume that because this are mostly questions answered by Herfried and
Arming.

I assume that the only thing you have to do is place a reference with

Project-> add reference -> browse -> add -> Ok

Imports .......

I hope this helps, although this is not really my area that I like to give
answer for.

Cor
Nov 21 '05 #2
AP,
Hope this is not too confusing.


I assume that because this are mostly questions answered by Herfried and
Arming.

I assume that the only thing you have to do is place a reference with

Project-> add reference -> browse -> add -> Ok

Imports .......

I hope this helps, although this is not really my area that I like to give
answer for.

Cor
Nov 21 '05 #3
AP

"Cor Ligthert [MVP]" <no************ @planet.nl> wrote in message
news:ek******** ******@TK2MSFTN GP14.phx.gbl...
AP,
Hope this is not too confusing.


I assume that because this are mostly questions answered by Herfried and
Arming.

I assume that the only thing you have to do is place a reference with

Project-> add reference -> browse -> add -> Ok

Imports .......

I hope this helps, although this is not really my area that I like to give
answer for.

Cor


Hi, Thanks for replying. I have done what you said but I still cant get it
to work
I have tried the following

Dim Game As Object
Game = CreateObject("G ameLib")

I have added a reference for GameLib but it will not assign the object, it
just comes up with an exception all the time.

Hope you can help

--
AP

Nov 21 '05 #4
AP

"Cor Ligthert [MVP]" <no************ @planet.nl> wrote in message
news:ek******** ******@TK2MSFTN GP14.phx.gbl...
AP,
Hope this is not too confusing.


I assume that because this are mostly questions answered by Herfried and
Arming.

I assume that the only thing you have to do is place a reference with

Project-> add reference -> browse -> add -> Ok

Imports .......

I hope this helps, although this is not really my area that I like to give
answer for.

Cor


Hi, Thanks for replying. I have done what you said but I still cant get it
to work
I have tried the following

Dim Game As Object
Game = CreateObject("G ameLib")

I have added a reference for GameLib but it will not assign the object, it
just comes up with an exception all the time.

Hope you can help

--
AP

Nov 21 '05 #5
AP,

As I said this is not my teritorium, however did you use the object browser
after that you had set it in your resources to see what public members it
has?

Cor
Nov 21 '05 #6
AP,

As I said this is not my teritorium, however did you use the object browser
after that you had set it in your resources to see what public members it
has?

Cor
Nov 21 '05 #7

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

Similar topics

0
277
by: Fiona McBride | last post by:
Hi all, I have a really odd problem with some Visual Basic .NET 2003 code; I have a program that creates a number of windows which contain RichTextBox, Timers (disabled) and menus. The code runs fine and creates the windows as required, BUT if the program is left to do nothing for several hours, when it is brought back into focus it generates an exception error (Object reference not set to instance of an object - this always coincides...
11
9278
by: DrUg13 | last post by:
In java, this seems so easy. You need a new object Object test = new Object() gives me exactly what I want. could someone please help me understand the different ways to do the same thing in C++. I find my self sometimes, trying Object app = Object(); Object *app = Object(); Object app = new Object();
1
5796
by: Bucky Pollard | last post by:
I have a web service that needs to create a batch file and call it (since there are no APIs for the functionality I am looking for). I am using the Process and ProcessStartInfo objects. When I try to call the batch file, it just returns with a return code of 1. When I call cmd.exe, and pass the batch file as a parameter it hangs. After much frustration and aggrevation, I found that CMD IS in fact running, but it is running under the context...
1
18213
by: Marc | last post by:
Hi! I'm working with a C# client that calls a php web service. I've created a wrapper to call the service using .NET wsdl tool (adding a web reference). The call to the server works fine, it is serialized correctly, and the server returns a response (I've captured the response and it's correct!) but when the .NET deserialize this response, it throws the exception "System.InvalidOperationException: There is an error in XML
1
2292
by: Jesper | last post by:
Hi, I've made an application that is running in the background - i.e. its not visible on the screen. I would like an eventhandler in the program to subscribe to the event that occurs when, say the windowskey+(some free key) is pressed. A little like the way you can start the file Explorer from windowskey+E, except that I do not want to start an app, but invoke an eventhandler in an already running program.
12
2031
by: chinkuang | last post by:
Hi Everyone: I have a question here: I used a startup object to protect my application - whenever PC starts up, I will check the setting of my application like registry, program files and so on, if they have been tampered then I will restore the original settings from the backup files I store in some hidden place. However now a guy said he has a tool that able to modify the Windows XP registry without even login to window - that means...
5
4917
by: muzilli | last post by:
Howdy all, I would like to know how can I insert a Timer object in my class library? This timer object will start and stop in a determinated part or event of my program. I know how to do this in Delphi or using a RAD tool and insert the Timer object in a form, but how to do in C# by hand and in a class library (without form), I don't know.
8
3924
by: Gary | last post by:
I'm using an Act database. I was stuck on this a year ago and am still having trouble. I have three bits of code like so : - act.CActAppObj objACT = new act.CActAppObj(); act.CAIBaseView objBaseView = new act.CAIBaseView(); act.CAIViews objViewsCollection = new act.CAIViews();
5
2569
by: =?Utf-8?B?RkxEYXZlTQ==?= | last post by:
I'm developing an application that gets data from 100 sources (via telnet connections, but you can think stock quotes from a webservice if you like). I was planning on using the thread pool (25 at a time). I know I would start all 100 at once and as threads finish, a new thread would become available and the next one would start. However, I need to do this over and over (using an app that will run for days or longer). How can I tell...
0
9562
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10542
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10309
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10068
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9119
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7600
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5625
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4274
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3795
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.