Building a card game with cards.ocx (1 Viewer)

G37Sam

Registered User.
Local time
Today, 18:58
Joined
Apr 23, 2008
Messages
454
I know many here hate to work with custom ActiveX control but entertain me please. I am using Windows XP with Access2007 FYI

I started by copying cards.ocx (availabe online for free) into C:\windows\system then registering the .ocx file using the following command in cmd

Code:
regsvr32 cards.ocx

That worked perfect

From within the form's toolbox, I choose ActiveX control and choose cardsocx only to get an error stating:

"A problem occurred while Microsoft Access was communicating with the OLE Server"

Is there something I missed?
 

G37Sam

Registered User.
Local time
Today, 18:58
Joined
Apr 23, 2008
Messages
454
Still getting the same error, I'm guessing the mentioned method is no different from regsvr32, nor is the one mentioned here either: http://support.microsoft.com/kb/173091

The thing that's bugging me most, is that if I register the ocx using Visual Basic 6 (or .net) then Access starts to recognize it. If I move to another machine with no VB6 VB.net, access then gives me the same error again
 

vbaInet

AWF VIP
Local time
Today, 15:58
Joined
Jan 22, 2010
Messages
26,374
Perhaps that ocx isn't supported in Access 2007. Send me a copy and I'll try and register it on mine.
 

G37Sam

Registered User.
Local time
Today, 18:58
Joined
Apr 23, 2008
Messages
454
Any luck?

How about using the cards.dll in system32 that's automatically installed with Windows, would that be possible?
 

vbaInet

AWF VIP
Local time
Today, 15:58
Joined
Jan 22, 2010
Messages
26,374
Not had a chance to have a look Sam. Got home and fell asleep ;)

And I can't install it at work.

Have you tried the one that is already installed?
 

G37Sam

Registered User.
Local time
Today, 18:58
Joined
Apr 23, 2008
Messages
454
Haha sorry man didn't mean to pressure you

I got the cards.dll to work on VB6 with the help of a tutorial, couldn't do anything about it in Access though. Cards.dll however draws on the form rather than create a control so I'm assuming some sort of API would have to be used, that's where I chickened out
 

vbaInet

AWF VIP
Local time
Today, 15:58
Joined
Jan 22, 2010
Messages
26,374
The cards.dll must contain a couple of classes that expose functions for drawing on the form. Obviously intellisense will expose the properties, methods and functions but the difficulty is getting documentation on its use :)

No pressure, I planned to look at it but was just too tired :)
 

vbaInet

AWF VIP
Local time
Today, 15:58
Joined
Jan 22, 2010
Messages
26,374
Just tried to install it without success. Perhaps the ocx wasn't made with Access in mind.

If RunCommand doesn't register it then it's not compatible with Access.
 

G37Sam

Registered User.
Local time
Today, 18:58
Joined
Apr 23, 2008
Messages
454
Thanks for your feedback vbaInet, appreciate it
 

Max D

Registered User.
Local time
Today, 07:58
Joined
Jul 3, 2009
Messages
91
ActiveXs have problems with 64-bit versions of office. Beside that, try to put your ocx at some other location (like c:\) - it can make a difference.

Also you can try to open your OCX via some editor or viewer and check DLL it uses. Maybe it relies on some DLL that is missing on targed PCs.
 

G37Sam

Registered User.
Local time
Today, 18:58
Joined
Apr 23, 2008
Messages
454
I am on a 32-bit Vista though

If it's not too much to ask, can you give it a shot and see if it can be done from your end?
 

Max D

Registered User.
Local time
Today, 07:58
Joined
Jul 3, 2009
Messages
91
CARDS.OCX installed ok at my WinXP via simple regsvr32 command and works ok at Access.

I found references to this files inside:
MSVBVM50.DLL
VBA5.DLL
PICCLP32.OCX

Check, if this files are present at "bad" PCs :)
 

G37Sam

Registered User.
Local time
Today, 18:58
Joined
Apr 23, 2008
Messages
454
I owe you a beer! Let me know if you're ever in Dubai :)
 

Users who are viewing this thread

Top Bottom