[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [TV] Started developing a project in VB



Robin Wilson wrote:
Thanks Gareth, that looks like it'll be very useful. I might see if I can do
the same kind of thing with Picture Boxes as I can then implement clicking
on the programs to get more information. Although, a form with hundreds of
picture boxes might be rather slow and unstable! :-(

Yes, using many pictures/labels would be a pain to code.

However I've since had a thought about that.

Using the mouseup event of the form we get the x and y of where the click occoured in the form (in twips).

It should be possible to make the renderlines sub store x1,y1,x2 and y2 co-ordinates for areas on the form defined as programs in an array, then whip up a bit of code in the mouseup event to match click co-ordinates to these areas.

Perhaps introduce urls to go with program names in the tvmap array so that this new feature would return the program url which could then be launched in the default browser perhaps via a shellexecute api call.

Basically turn the form into a sort of 'image map'.

I shall have a play (I have nothing better to do this weekend :D)