events

Discrete event simulation framework for .NET

Does anyone have an experience with some discrete event simulation library that could be used in .NET (C#)? Despite the basic functionality for queing events and dispatching them, it would be fine to have some non-deterministic behavior (e.g. failures simulation). I have some tips and I am even considering to write my own, but first, I...

Detecting when the mouse is not moving

I am able to find the cursor position. But I need to find out if the mouse is stable. If the mouse wasn't moved for more than 1 minute, then we have to alert the user. How its possible, are there any special events for this? (Only for IE in javascript) ...

Does jQuery have it's own OOP syntax the way that Mootools does?

I have an old project that I'm resurrecting as it were, and it makes heavy use of a Javascript/moo tools event controller that I wrote, and also a few Javascript OOP components that I wrote. It's very heavily pattern and OOP based. Also the components are well decoupled. Does jQuery have any features like these? And if so what are th...

Call XAML animation from VB code in WPF

Guys, here's what I'm trying to do: I have a Storyboard animation for an object done in Expression Blend. What I need is to be able to trigger that animation from the VB.net code. Any ideas? Thanks, ...

recognise combobox deselect when using Swing + models?

I'm trying to write a nice GUI in Swing that uses the proper Model-Delegate pattern as much as possible. I have a JComboBox that when changed, needs to update the model with the new data. To get the currently selected item, I am using: fooCombo.addItemListener(new ItemListener() { public void itemStateChanged(final ItemEvent arg0) {...

Determine when Postback occurs because of a textbox being changed

I've got a usercontrol that has a <asp:TextBox> with autopostback set to true. When the user types text in and moves off the textbox, asp.net fires a postback event. However, it isn't handled specifically by the textbox, but is instead simply a postback - the page_load fires and then life goes on. What I need is a way to know that this ...

How to insert an element in DIV at position X Y

Hi! I am trying to create a webpage where users can insert a pin (like google map) in between the text using context menu. My problem is that i do not know how to insert the pin at the exact position. Using the DOM I can arrive only to the nearest DIV (by using this) but a DIV contains a lot of text and the PIN has to be positioned nex...

How to check if the key pressed was an arrow key in Java KeyListener?

Can you help me refactor this code: public void keyPressed(KeyEvent e) { if (e.getKeyCode()==39) { //Right arrow key code } else if (e.getKeyCode()==37) { //Left arrow key code } repaint(); } Please mention how to check for up/down arrow keys as well.Thanks! ...

Server-Side eventing between Silverlight and the host .aspx page

Is it possible to set up a listener in a Silverlight control to listen for events on the hosting aspx web page? I want to have several Silverlight and ASP.NET user controls hosted in a web page. I want to fire an event on one user control, sending an event to the host page (it needs to be notified), and then I want to broadcast an even...

Is it possible to detect that your javascript code is executing because of an event?

If you don't control the invocation of your code, but would like to know if it's being executed by an event handler, is this possible? ...

Clipboard event C#

Is there a clipboard changed or updated event that i can access through C#? ...

Can a single SetEvent() trigger multiple WaitForSingleObject()

This: http://msdn.microsoft.com/en-us/library/ms686915(VS.85).aspx Would seem to suggest not. I have three processes communicating via pipes. Process A Creates an event, Process B & C each use WaitForSingleObject (in a second thread). So now we have -TWO- Processes each waiting for a -SINGLE- event. Process A fires the event with Se...

Are there any events that tell an application when garbage collection has occurred?

I am trying to find a way to know about garbage collection. Either, when it has started, finished or is in process. I really just need some event connected to the collection itself (I think). My issue is that I have a WeakEventManager (written from scratch) and I have cleanup methods that delete and WeakReferences that are no longer ali...

How to change cursor position of wxRichTextCtrl in event handler?

I have a RichTextCtrl in my application, that has a handler for EVT_KEY_DOWN. The code that is executed is the following : def move_caret(self): pdb.set_trace() self.rich.GetCaret().Move((0,0)) self.Refresh() def onClick(self,event): self.move_caret() event.Skip() rich is my RichTextCtrl. Here is what I would ...

Window events for JFrames that are hidden/shown via setVisible?

Which sort of listener do I have to add to a JFrame to detect when it is being hidden/shown via setVisible? I tried using a WindowListener and the windowOpened and windowClosed methods, but they only work for the first time that a window is opened (windowOpened) or, respectively, when the window is closed using the dispose method (windo...

How can I make my own event in C#?

Hi, How can I make my own event in C#? Thanks ...

Removing events in Shoes

The is any way to remove the events in Shoes? I searched around many websites and references but I can't found any way to remove a event... I minding that I will need to create my own event manager... its really nescessary? or there is a way to desattach event listeners? ...

Enable a Currently Disabled Dropdown List when Clicking the Dropdown List

Here is the scenario: I have two radio buttons, 1) for a normal customers and 2) for business partners which also has a drop down control so that one of X number of business partners can be selected. When one customer type is selected the other section goes dark with the normal disabling of controls and applying CSS to get that disable...

Can Events be Inter-Process?

I have created an event in one process and to test, sent the event handle via a pipe to a totally separate process (not a child thread) When I fire the event in the first, WaitForSingleObject does not detect the event so I am guessing the answer is no unless I missed some trick in the SECURITY_ATTRIBUTES structure? Or perhaps I need to...

ASP.net can't update page from event handler

i have a linkbutton on a page, the event hander for the click event of that button calls a method on an object which in turn makes a call to a webservice, when the webservice returns the object fires an event and an event handler on the page codebehind updates a label on the page. For some reason the label doesn't display the message. T...