Quantcast
Channel: Mentor Graphics Communities: Message List
Viewing all articles
Browse latest Browse all 4541

Re: How to get mouse position in DxD / xDx?

$
0
0

Now you are getting more complicated.  If you look at the help for DxDesigner Automation, and look at the Application object, you will see that while there is an application event for moving the mouse, there is none for clicking or doing anything else with the mouse.

 

Which means you will now have to use mouse events from the operating system, and combine them with events from DxDesigner.  And, using the OS mouse events is kind of tricky, as I alluded to above.  If you start from scratch, it will take you many hours of research and trial and error to come up with a .net project that works and includes functioning bits for all the stuff you will need to do.  There is no simple solution here, and much of what you encounter will appear to be unfathomable unless you either have many years of .net experience or have a degree in software engineering. 

 

Fortunately for you, I have already done all that. I have a vb.net project with everything in it you would need to capture all mouse events from the OS, and I will share it with you. Send me a message through the forum here and we'll work out the details.

 

Now, about your second paragraph.  You don't clear events.  They happen, and the code in the event handler executes. Every time.  A series of if/then statements can send the event handler down many different paths. You can set variables and controls any way you like to alter the course of the event handler's path, and thus effect different outcomes. The event handler must be thought of as a response that happens every time the event fires, making no assumptions about anything, but evaluating everything it needs to in order to accomplish what you want. 

 

If you give us an idea of what you are actually trying to do, we may be able to point you in the right direction as to how to accomplish it. 


Viewing all articles
Browse latest Browse all 4541

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>