Creating dialogue box to choose answer during runtime from button - c#

I am working on a project with a third-person template added. I want to have a box where text popups along with two buttons yes and no. I added Text and a button from UI options but my mouse is not going over Button(the highlighted colour is not coming up). Is it because the mouse is already assigned to move my player camera or something, or do I need to do code something particular ?
Thank you

Related

Add Invisible Control and use Control.MouseHover Event

I have developed a board game. I want to add one more feature onto it. If I move my cursor onto one of the entry on the game board. It will show relevant information right next to the cursor. I know I can add invisible controls onto the game board and use Control.MouseHover Event to make this feature work. However, what kind of invisible control I can add onto the board? The rectangle shape will be most useful. One more question, how to display text right next to the cursor? I have attached the board I was talking about in below.
Thank you for helping me.

How to move the control/UI elements along with the keyboard in UWP

I'm wondering if there any solution that could make the app automatically adjust the controls position when the keyboard is activated. For example, in the image below, I want to make those four button on the screen move dependently with keyboard. When the keyboard is activated, buttons move to the center and move back when the keyboard is gone.
There might be some similar questions here but I couldnt see them in the search result, maybe they are using some different words on title so if this question is duplicated it will be appreciated if you guys could paste the link on comment or whereever.
The idea is you can listen to the Showing and Hiding event of the InputPane. In the event handler, you adjust your UI layout with respect to the keyboard.
For example, you can realign the button relative to the height of the keyboard.
For more information on InputPane, refer to https://msdn.microsoft.com/EN-US/library/windows/apps/windows.ui.viewmanagement.inputpane.aspx
For dynamically align the UI layout example, refer to
https://code.msdn.microsoft.com/windowsapps/Keyboard-Events-Sample-866ba41c

Multi layer button / ring button

I need to create custom button. This will be circle with rings, each ring is separate button. Button text will be displayed on rings. Bellow you can find image how button will looks.
http://imageshack.us/photo/my-images/90/ringbutton.png
I would like to know if it is possible to create this kind of button using VS and WPF.
Do I need third party libraries?
Any examples of similar buttons?
As I written before I had put different size circle buttons one over another and is working like dream. But still I can't display some text on created "rings".
I had use path to display text on rings but is complicated (for me) and text cover button so I can't click where text is.
Any ideas?
You could just put the image on your form and implement a Click() event. It's really not that different from a "real" button.

Clicking grid view with drag and drop? [duplicate]

This question already exists:
Closed 10 years ago.
Possible Duplicate:
Click and drag image to image grid?
I have a few image boxes in my form and I was wondering how can I would place a grid across the form that have a bunch of lines so the whole grid is a bunch of 64 x 64 squares. I need it so I can select an image and place it onto a specific square using the mouse and be able to go through the whole grid and check for example how many of one specific image is on the grid. To give you a better idea of what I'm doing is that I have a few image boxs which contain different 64 x 64 images. There is another image box that shows the image I clicked on last, which is like a brush because whenever you left click a box in the grid it pastes it into that specific box in the grid. I also need it so I can right click the box and delete the image in the box the mouse is over. Finally I need to be able to read all the images in the box and output it into a file that I can later open. I'm using it to create land in a game, which the program will output the needed texture and and where ground level is for the boxs which make up the whole terrain. What I need to know is what kind of thing should I do to be able to do this? I've been trying the past few hours on how I make the boxs and how to know where the mouse is and stuff and I'm completely stuck. A simple idea would be helpful. I actually don't know what control(s) I should use for this so an idea that doesn't involve any grid controls is still very helpful.
I don't know if it's the best possible idea, but you could use FlowLayoutPanel with WrapContent set to true and FlowDirection = LeftToRight. I dont know about Drag&Drop operation though (never done it with FlowLayoutPanel, buth there are some nice tutorials out there).
You can track your mouse position using mouse events. If you don't want to do that:
You can get absolute position at any time using:
Point currentPos = System.Windows.Forms.Cursor.Position;
Then, to get relative position on your (current) control:
Point relativeLoc = this.PointToClient(currentPos)
... and then, to get control over which your mouse is on FlowLaoutPanel:
Control c = flowLayoutPanel1.GetChildAtPoint(relativeLoc);

show little message on hover over an image button on ASP.NET?

I'm developing a system which uses a lot of image buttons for redirections...
However, I want the buttons to show a little mesage whenever you put the cursor over the button...
Example, when you hover the cursor over the button which redirects you to Schedule, a little message that says "Schedule" appears. That way, the user may not recognize the picture, but when he hovers over the button, he will know where will he be redirected...
Hope you can help me
You can use ToolTip property associated with your image (System.Web.UI.WebControls.Image)
Link : http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.webcontrol.tooltip

Categories