Hi Cesogrande,
Hope you logged in okay. If you have any VB/ActiveX control questions you should first search the VB forums. Often, the question has already been answered several times.
VBforums has been a bit spotty lately...due to traffic I guess. So, if you come to this site...and it doesn't show...come back later.
I'll upload the zipped file representing the basic framework for the 'dominos' project later, perhaps tonight.
I have created an ActiveX that uses numbers to display domino values. The properties for this control are ID, Orient, num1 and num2. I have a demo program that allows you to move a VScroll bar through values 1 to 28, any orientation, and display the correct representation.
I will build the Artificial Intelligence (AI) to operate with this control. This will serve as an example regarding how your control will interact with the AI part of the program.
There is a notes.txt file in the zipped file I will send that specifies variable naming conventions, use of modules, error handling, etc.
I think JB has been drafted to write the help file. I'll try asking him to help a few more times before I tell him to do it. ;-)
Cesogrande,
I am attaching two VB projects. Unzip everything into one folder.
One project is dom_control which is the ActiveX domino control. I used 2 labels to indicate the numerical value of the domino faces. You can study this source code and make significant improvements upon it.
To test the control, open up the domino project and you will see the dom_control, vscroll bar and some option buttons for orientation. Simply run this program, move the scroll bar. Properties used to control the dom_control are ID and Orient. The .ocx file is also zipped...this will be in the same folder so I am not sure that you have to register this component. Not sure.
The domino project is the start of the AI portion. I will continue to work with this using the 'poor man's dom_control.
Chapter 20 in VB Black book is a great resource for ActiveX controls. You may want to study that along with dom_control.
See notes.txt in the domino project and feedback any changes on conventions, functions, etc.
Text-based domino control a good idea. I am in the process of building a graphical control and your control will certainly help. I will post it when it works.
I am experiment with writing DLL files in VC++ that can be used by VB. Although it is definitely not necessary, I would like to write a few functions/classes that could be used in VB for this project...just for the experience.
Here's a thought on your domino control. Keep an open mind to having a 'type' of domino style. For example:
dom as new Domino
dom.styletype="whiteplain"
or
dom.styletype="blackdragon"
styletype doesn't have to be a string...just an example...
So when the domino is numbers down, the back side is either a white plain domino or will show a black dragon. This may seem difficult for now but keep that in mind...as this would be certainly really cool and would really impress our 'beta tester' ;-).
Hi C,
How's it going with the control? They are a bit tricky at first, however once you get the pattern down they are really neat.
I have been distracted with C++ and OpenGL. Pretty cool stuff. I have got to show you how simple it would be for you to implement...later.
Ask the Judge this question for me. What happens when no one can play any more, there are no more bones in the bone pile...should the points in each person's stack of bones still count?
This happened with my and my little girl.