Highlight point on image map - asp.net

I am working on imagemap, there are points on my image, I want to mark one of point upon clicking of a button, also please give me idea how can I can control the coordinates because my image is resizeable/dynamic, every time image size will be changed.
http://img191.imageshack.us/img191/1330/imgmaps.png http://img191.imageshack.us/img191/1330/imgmaps.png
Many Thanks for any kind of help.

This seems interesting, but easily possible,
Take and imagebutton control and load your image into it, in the server side click event of it, you will get co-ordintates of the clicked point, you can simply use GDI+ library of .net framework to draw a point on your image.
I hope this helps

Related

How to pause game running in background during asynchronous event?

I am creating a game in GMS2. I am using "show_message_async()" in my code. I know that when it is run, a message pops up on the screen and the game still runs in the background. However, I want the game to freeze in the background while the message pops up. Is it possible to do this? And if so how.
You should try looking up instance_deactivate_all(notme) and instance_activatie_all(notme)
https://docs.yoyogames.com/source/dadiospice/002_reference/objects%20and%20instances/instances/deactivating%20instances/index.html
This will disable all objects in a room except the object that's calling it (which should be the menu object that shows the message)
The only tricky part of it, it that it also disables drawing the objects. resulting in an empty screen. For this, you could either use a black screen, or draw a screenshot of the scene before they're disabled.
I agree with Steven's answer. To add on his answer about taking the screenshot of the game, you probably need to make a new surface, then use surface_copy from application_surface before deactivating the object.

JavaFX 8 Dialog Button Area

Please see this gist to see what I am trying to achieve: https://gist.github.com/d9e22915234e6ea34d20
The code is heavily cut down on the problem I face. As you can see when running the code there is a "miss" detected on the label or the text area (if you miss it by 5em or whatever). Unfortunately this does not work for the Dialog's own buttons OK and Cancel (Please run the code and you will see immediately what i am talking about). If you click near an FX-Node it should detect wheter you missed it or not.
Does anybody know if it is possible to detect clicks in the Dialogs button area?
And if it is possible, how to link them to the node like the label and the area?
Thank you in advance.
From what you're seeing, I would guess that the Dialog consumes click events in the button bar, so they don't make it to the Window (which is where you added the EventHandler). If you really want to do this, you can change addEventHandler to addEventFilter. This works for me.
Read this tutorial if you want to find out why this works:
http://docs.oracle.com/javase/8/javafx/events-tutorial/processing.htm#CEGJAAFD

Reactivate drag control fails in openlayers

all. I have this little Problem and i'am looking for some help:
first I have a function which contains the following:
var point = new OpenLayers.Geometry.Point(imageConfig.XPos, imageConfig.YPos);
var imageFeature = new OpenLayers.Feature.Vector(point);
layers.imageLayer.addFeatures([imageFeature]);
So a point is be drawn on the layer. On this layer there is also an openlayers drag control. It is activated after the point was drawn. Now I can drag the point around. Works like a charm.
This is a little part of a user driven step by step procedure. So after dragging is done the next steps doing something with the point. While these other steps the drag control is deactivated. In the procedure it is possible to jump between steps so the de/activate of the drag control is needed. This works fine.
At the end of all steps the point is removed from the layer. Also this works great.
BUT: if I call again the function which draws the point on the layer (of cause now it is a new one) and activate the drag control I cant drag the new point any more even if I try to select the point with mouse click?!
I controlled with firbug:
feature is there
feature is on the right layer
control is there
control is on the right layer
control is activated
Maybe I' am missing a simple thing here. But I breaking my hed on this for two days now and can't find an answer.
By the way I found that in the first step sequence (when all works great) the controls feature property is set with the point feature. But in the second not. The same in the controls drag handler feature property.
I tried to set it manually by:
control.feature = imageFeature
and:
control.handler.drag.feature = imageFeature
I was looking for a function to set the new feature to the control. But can't find any on the openlayers docs.
Other controls at not active at the same time (controlled it with firebug).
But no luck. Didn't help. Why this? I'am sure that this should work. What am I doing wrong or miss under standing here???
Every help appreciated.
Thanks
Figured it out by my self. Problem was that I used a geoext feature store to display points in a grid. This grid was configured wit a geoext feature selection model. I just copied this...
The selection model also asign a feature select control on the map. In the first round this do no conflicts to the drag control because it is loaded after.
When the the tool enters the first step again all controls are loaded to the map. the select control and the drag control is enabled. this can't be handled by open layers. It seems the last to map added control is the one which comes with priority. So you can enable the drag control after again and again. The select control wins.
The trick is to decativate the select control. Then all works perfect.

how to add click event on image area on flex?

Can i create img map and then add several click event?
for example this img-
I have 4 area for event top-left, top-right etc.
How i can do this?
I need something like tag map on HTML.
Another approach would be to set the buttonMode to true on your image, add a click handler to it, then check if the point that got clicked is in any of the particular areas you care about. Hope that helps.
You should check out flexlib. I found this via a search and the result was already in StackOverflow: Image map in Flex So technically this question is a duplicate.

Qt - In QGraphicsScene how to put a picture dynamically

Hai,
I am trying to create a chess board. Here I want to do a operation like when ever a coin is clicked and dragged, at that time that picture should be copied and be placed in that old position. I don't know in which function I have to do it. When I made it on mouse pressed, then tyhe copy is coming above the original(layer wise). So somebody please help me
When I made it on mouse pressed, then tyhe copy is coming above the original(layer wise).
When you got this far, simply adding a call to myItemCopy->setZValue( -1 ) would place the copy "behind" the original item.
A different approach, and possibly "cleaner", would be to use QDrag and tell Qt how to paint your item during the Drag operation. See Qt's "Drag and Drop Robot" example for reference: http://doc.qt.io/qt-5/qtwidgets-graphicsview-dragdroprobot-example.html
Happy coding!
Robin
Simplest way to do this will be to put 2 identical QGraphicsItems for each coin/piece at the same location. The top one will be dragged and moved while the bottom one will stay for the visual cue you want.
Once the top one is dropped to the new location, move the bottom one there too.

Resources