events

ASP.NET Textbox - Avoid Copy Paste of few characters

hi, We need to stop copy paste of few characters like '<' or '>' or any characters which can be potentially dangerous. I know we can set a property RequestValidation to false, but for some reason we would not want to do that. What we want to do is when the user tries to paste a text in the textbox, we want to validate the text and do...

Is any one aware of windows event to trap the mouse and keyboard input

I want to trap windows mouse and keyboard input with the help of event given by windows for detecting system idle or not in C++. Two things I have tried: 1. Hooking concept, but as antivirus might not allow it and also CPU usage increases if we use hooking. 2. GetLastInputInfo() which also eats CPU usage about 50 % Anyone can tell me i...

How to assign event callbacks iterating an array in javascript (jQuery)

I'm generating an unordered list through javascript (using jQuery). Each listitem must receive its own event listener for the 'click'-event. However, I'm having trouble getting the right callback attached to the right item. A (stripped) code sample might clear things up a bit: for(class_id in classes) { callback = function() { this....

What is the difference between the mouseover and mouseenter events?

I have always used the mouseover event, but while reading the jquery documentation I found mouseenter. They seem to function exactly the same. Is there a difference between the two, and if so when should I use them? (Also applies for mouseout vs mouseleave) ...

How can I get a css position change to take effect during a JQuery UI Draggable element's start event handler?

I have an odd situation in which I need to modify the position of a draggable element as soon as the user starts dragging it. So, during the draggable element's start event handler, I'm trying to set the position. It doesn't respond to the position change unless - and this is weird - I do something to cause a javascript error after I cha...

How to make a button deep in a nested Swing panel get the "keyboard focus"?

I have a swing frame that contains embedded panels that contain other panels, etc. Deep down, there is a button. I want the button to get focus so that pressing the "enter" key would generate an actionPerformed event. However, if I do myButton.requestFocus() or myButton.requestFocusInWindow() the whole window gets the focus, but nothin...

WPF DataGrid how to get when ItemsSource updates

Which event fires when DataGrid's source is updating? I've tried DataContextChanged and SourceUpdated but it never worked out. Actually I need a simple thing. I want, if there is a new row comes, scroll the GridView's scrollbar down to the bottom to see what it was. ...

Detect Combination Key Event

I would like to perform key event detection in textbox. The key should combination of Ctrl+K, is there any best way to do it? ...

Proper event handling using jQuery

I've been working with some event handling in Javascript and recently decided to migrate from Prototype to jQuery. I already encountered some trouble using Prototype, but found some workarounds which at least solved the problems, but didn't look very nice to me. Now I'm rewriting everything anyway, I'd like to get it all straight on the ...

How to close/hide the Android Soft Keyboard?

I'm having an EditText and a Button in my layout. After writing inside the edit field and clicking on the Button, I want to hide the virtual keyboard. I guess there should be a simple, one- or two-liner to make this happen. Where can I find an example of it? ...

Prism, Event published in shell not caught in module!

Hi, I have a wpf composite application with 3 or 4 modules that will always be loaded. In my shell I have a toolbar with buttons to active corresponding views from these modules. I injected an IEventAggregator into the shell presentor so that when a button is pressed I can publish an event that the corresponding module controller has sub...

Intercept windows open file

Hello, I'm trying to make a small program that could intercept the open process of a file. The purpose is when an user double-click on a file in a given folder, windows would inform to the software, then it process that petition and return windows the data of the file. Maybe there would be another solution like monitoring Open messag...

What is the order of event dispatch in Flex 3?

I have a checkbox that is bound to a property: <mx:CheckBox label="Show All" selected="{showAll}"/> I want to trigger an event when the checkbox is toggled that will read the value of showAll after a change: <mx:CheckBox label="Show All" selected="{showAll}" click="_list.refresh()" /> Where, in this case, _list is an ArrayCollectio...

Capture and send keyboard / mouse input in C#

I am looking for a way to send and receive keyboard information regardless of what app has focus. I remember back in College seeing a presentation about an old Windows API that let you change the cursor position and send right clicks and such. Besides User32.dll is there a way to do this with the .net framework? ...

JavaScript, stop additional event listeners

Imagine I have this code: var myFunc1 = function(event) { alert(1); } var myFunc2 = function(event) { alert(2); } element.addEventListener('click', myFunc1); element.addEventListener('click', myFunc2); When the click event is fired myFunc1 is called, then myFunc2. But how do I (if at all possible) stop myFunc2 from being call...

what's the best way to implement chained events in C#

I have the following scenario. The client code only has access to FooHandler, not directly to Foo instances. public delegate void FooLoaded(object sender, EventArgs e); class Foo { public event FooLoaded loaded; /* ... some code ... */ public void Load() { load_asynchronously(); } public void callMeWhenLoadingIsDone() {...

How to trigger a repeated event by mouse hovering in JQuery?

Hi All! I was building a simple carousel list for learning purpose. In some carousel samples, if u hover muse on the prev or next button, the list starts scrolling, as if a repeating click event was being passed to the prev and next buttons. Now, in my carousel, i have prev and next buttons that will slide up and down the list. Now i ...

Repeating "Events" (Calendar)

I'm currently working on an application that allows people to schedule "Shows" for an online radio station. I want the ability for the user to setup a repeated event, say for example:- "Manic Monday" show - Every Monday From 9-11 "Mid Month Madness" - Every Second Thursday of the Month "This months new music" - 1st of every month. Wha...

How many times is onunload triggered?

Hello all, I have just been helped on a problem I have here. var win = window.open(url, name); win.onunload = StartLoad; win.close(); To solve this problem completely, I wanted to know if onunload will be triggered once or every time a event occurs? In other words, will my function startLoad run every time the child window "win" get...

Does Prism (CAL) provide any way to bind a command to for example a MouseClick event?

Hi girls and guys! I recently looked into Prism (aka the Composite Application Library for WPF) and really like the way I can structure my apps with it. However there is one downside that I just couldn't resolve. Is it possible to bind a command (from a ViewModel for instance) to an Event (for example: RightMouseButtonDown) via Prism?...