You can use the rect class to store and test région too Dim aRect as new Rect[]
aRect.Add(Rect(5,5,10,10)) aRect. Add... etc Use in mouse event : For I =0 to aRect.max If aRect[i].contains(mouse.x,mouse.y) then print i Next Le 22 mai 2013 17:10, "Tobias Boege" <tabo...@gmail.com> a écrit : > On Wed, 22 May 2013, Marco wrote: > > Hi all, > > > > I'm trying to write something so that I can display an image (a map of a > > building). On this image several temperature probes are displayed. I'd > > like to click the image on specific regions and want a textbox to be > > filled with the temperature value of this probe. > > > > The real problem isn't the connection to the probes and displaying the > > values in the textbox. I allready made this work with normal buttons and > > no image. But to make it more fancy I'd want to use the image with the > > nice map of the building. This way it's more understanding for everyone > > using it. > > > > I allready tried to get coordinates out of clicking on the image, but > > without any results. > > > > Hope there is a solution for this. > > > > I'd display the picture in a PictureBox and then do it like image maps in > HTML. You can use the MouseUp events to capture a click. > > I think it's better to just show you an example. Attached. Not the > prettiest > one and you may have better algorithms to search for a region but you get > the idea. > > Regards, > Tobi > > > ------------------------------------------------------------------------------ > Try New Relic Now & We'll Send You this Cool Shirt > New Relic is the only SaaS-based application performance monitoring service > that delivers powerful full stack analytics. Optimize and monitor your > browser, app, & servers with just a few lines of code. Try New Relic > and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may > _______________________________________________ > Gambas-user mailing list > Gambas-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > > ------------------------------------------------------------------------------ Try New Relic Now & We'll Send You this Cool Shirt New Relic is the only SaaS-based application performance monitoring service that delivers powerful full stack analytics. Optimize and monitor your browser, app, & servers with just a few lines of code. Try New Relic and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user