control array :(

Slurpee

Newcomer
Joined
Apr 19, 2003
Messages
15
quick question (I hope) I'm currently making a connect 4 game. To speed things up I decided to write a control array class. This class houses my add-button method and its clickhandler. Now here is my question: in my form I call my class to to generate the buttons necessary for the GUI, now how do I refrence the clickhandler from my form? I need this so that I am able populate my array with the locations the player has chosen. Any advice or links to relavant sources are greatly appreciated.
 
i actually work it out ;) as I expected it's a really easy fix.
Just make a new object refrence to your form:
Dim Otherfrm AS New Form2()
then change the target of the handler
AddHandler GameButton.Click, AddressOf Otherfrm.ClickHandler

:)
 
Back
Top