As 3 - API Drawing -> Mouse Trace

I have a question :
I want to put 3 PCs picture , and when i click one of them there will be line that when i go above the other PCs it will stop and put the line at the place between them

I just need a code that create the line when i click on one of the pcs and stop him when i am leave the CLICK .

thanks in advance , Intro .