473,385 Members | 1,942 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Record last mouse click for use in a statment

1
I am trying to find out how to record last mouse event so that i can use it in a statement for example.
Expand|Select|Wrap|Line Numbers
  1. private void blueballoon_click(object sender, MouseButtonEventArgs e)
  2.         {
  3.             if (last_click == "green" "brown" "red")
  4.             {
  5.                 PopBalloonCount--;
  6.             }
  7.             else
  8.             {
  9.                 PopBalloonCount++;
  10.             }
  11.             score.Content = "Your Score" + " " + Convert.ToString(PopBalloonCount);
  12.         }   
  13.  
  14.         private void greenballoon_click(object sender, MouseButtonEventArgs e)
  15.         {
  16.             if (last_click == "blue") 
  17.              { 
  18.                  PopBalloonCount++;
  19.              }
  20.             else 
  21.              { 
  22.                  PopBalloonCount--;
  23.              }
  24.             score.Content = "Your Score" + " " + Convert.ToString(PopBalloonCount);
  25.         }  
Is there a simple way of doing this and if so how?
Mar 23 '14 #1
0 1020

Sign in to post your reply or Sign up for a free account.

Similar topics

10
by: BadOmen | last post by:
I want my program to send a mouse click to the window at the current mouse position, how do I do that? Example: I have my mouse over a button in Word and then my program is sending the left...
1
by: MrNobody | last post by:
I have a DataGrid which I added a MouseUp event: datagrid.MouseUp += new MouseEventHandler(onMouseUp); which simply does: if (e.Button == MouseButtons.Right) { if(hti.Type ==...
4
by: Prateek | last post by:
Hi All, I have created an ASP.NET page that basically consists of a table having text boxes in all cells. The table is created using client side java script. There are some calculations being...
4
by: aam | last post by:
i'm trying to find the coordinates of a certain button on a page that i'm viewing so i can program the mouse to click on it automatically every so many seconds. either that or have the mouse click...
24
by: aam | last post by:
hi, im trying to figure out how i can program the mouse to automatically click on a button of a web page that i'm viewing.i do not have control over the page.i would also like to set up an...
3
by: Gary Kahrau | last post by:
How do I programatically apply a click to a particular row and column 0 of a datagrid? I want to do this in code as if the user did a mouse click on the leftmost column. ...
2
by: beaker | last post by:
Hello, I'm writing a program (which will be running in the background 99% of the time) and I want to be able to work out how long it has been since the user last used the mouse and/or keyboard. ...
5
by: moonie | last post by:
I have an msn style c# windows application with a form and panel on it. A news list is drawn from the database and dynamically added via labels, link lables during form loading. In this...
1
by: hamidnourashraf | last post by:
I'm wondering if it's possible to invoke a mouse click anywhere. I don't mean invoke a mouse click event but, the actual mouse click itself. For instance, If I had my mouse over the "my computer"...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.