com >> Automation

by Andy » Sun, 29 Jan 2006 04:39:49 GMT

Hello,

I am trying to automate a game with VB.NET but I am having trouble doing so.
I have added a reference to the library (GameLib 1.0) and typed the
following code.

Dim A as Object
A = GetObject("","GameLib.Game")

but I always get an error saying unable to create activex control.
Apart from GameLib.Game there is also GameLib.GameClass and GameLib.IGame
I have used Spy++ to identify the window as an ATL window.

In the registry, neithier GameLib.Game/Class or IGame appears in
HKEY_CLASSES_ROOT/CLSID, is this where all automation ojects are stored?

I have tried reading tutorials on COM,VB and automation but I cant make
sense of them.
What do I need to do with library and class file so that I can automate the
program?

Thanks
Andy





com >> Automation

by Ken Halter » Tue, 31 Jan 2006 01:52:18 GMT





I can't believe this question's been here for this long without the
usual.....

You'll want to post that question in a .Net group.
They all contain "dotnet" or "vsnet" in their names.
This and all other groups on the MS server that start with
"microsoft.public.vb"
are for VB Classic (mostly VB5/6) and were in existance long before any .Net
products were released. While some of the code looks the same, they are very
different products and require a different set of groups.

Try one of these:






--
Ken Halter - MS-MVP-VB - Please keep all discussions in the groups..
DLL Hell problems? Try ComGuard - http://www.vbsight.com/ComGuard.htm
Freeware 4 color Gradient Frame? http://www.vbsight.com/GradFrameCTL.htm





Similar Threads

1. Supressing the ctrl-c and other keys during word automation in automation

Hi,

can someone help me and provide me the information on how to supress
the
default action of the shortcut keys of word during word automation.

I am using C#.Net

I have written a code but it generates a exception "Object Reference
not set
to an instance of a object".

I have posted my code here, can someone take a look at it and help in
understand and help me to get the solution for this

Word._Application app = null;

object c = Word.WdKey.wdKeyC;

object ctrl = Word.WdKey.wdKeyControl;

object mykey = null;

word.KeyBindings.ClearAll();

mykey =
word.KeyBindings.Add(Word.WdKeyCategory.wdKeyCategoryCommand,"DoSomeThing",app.BuildKeyCode(Word.WdKey.wdKeyControl,
ref c, ref missing, ref missing),ref missing,ref missing);

Here DoSomething is a dummy function

public void DoSomeThing()
{
}

It would be great if someone could help me.

My mail id is  XXXX@XXXXX.COM 

Thanks for the help

Regards,
Govardhan