Hello!

I'm currently making <<The game of life>> in TP7. Actually, I have already finished everything. The only thing I would like to add is mouse input, so the user could draw the 'cells' by clicking a mousebutton. So, for example a mouseclick on coordinates (50,20) would change grid[50,20] to 'true'. How is this possible? I have found some mouse snippets on the internet, but they don't seem to work with my IDE.

Thanks in advance.

Mouse-Pascal

I have checked the article, downloaded the unit and the example .pas file. However, when trying to run it, I get an error "Cannot run a unit". I have put the unit file in my TP7\units folder, and set the unit directory to ..\units
What could be the problem? Because I get this error with any mouse unit files. (Only mouse unit files)

http://www.programmersheaven.com/download/40015/download.aspx
I downloaded the program too.
Find the TG_Mouse.Pas file and copy to your C:\BP\UNITS\ dir
Run the Turbo Pascal ide load the TG_Mouse.pas,this is a unit's sourcefile.
Go to the Compile option and compile it and press the make option
this option make a TG_Mouse.TPU(this is the compiled unit)
then you can use this unit like others
program something;
Uses Crt,TG_Mouse,Dos;
.....
......
:D

http://www.programmersheaven.com/download/40015/download.aspx
I downloaded the program too.
Find the TG_Mouse.Pas file and copy to your C:\BP\UNITS\ dir
Run the Turbo Pascal ide load the TG_Mouse.pas,this is a unit's sourcefile.
Go to the Compile option and compile it and press the make option
this option make a TG_Mouse.TPU(this is the compiled unit)
then you can use this unit like others
program something;
Uses Crt,TG_Mouse,Dos;
.....
......
:D

Thanks! Everything works now :D

#Edit: How do I mark this post as solved?

down on this page there is a writting named MARK AS SOLVED just press it

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.