event-handling

How do I add events to nested server controls? (ASP.Net)

I am building a custom master page type control i.e. sort of like a datagrid but should be easier to add custom functionality into it. It's going great but part of the desired functionality is to have a paging control that switches on and off and part of that control would be a textbox that displays the current page number and on TextCha...

Call a function when "event.GetFrom(m_cpVoice)==S_OK" (ergo when event happens) [SAPI 5.1 and C++]

Hello, I'm doing a project with a 3D model, that speaks. So, I'm using SAPI 5.1, and I want to call a function asynchronously when there's a Viseme event (in order to play the animation related to). How could I do it? Thank you very much. Note: I use : hRes = m_cpVoice->Speak(L"All I want is to solve this problem", SPF_ASYNC , NULL...

How can I add an event handler to an event by name?

I'm attempting to add an event handler for every control on my form. The form is a simple info box which pops up, and clicking anywhere on it does the same thing (sort of like Outlook's email notifier.) To do this, I've written a recursive method to add a MouseClick handler to each control, as follows: private void AddMouseClickHandler(...

Deciphering which control fired an event

I have an application with many images that all look the same and perform similar tasks: <Image Grid.Column="1" Grid.Row="0" Name="image_prog1_slot0" Stretch="Uniform" Source="bullet-icon.png" StretchDirection="Both" MouseDown="image_prog1_slot0_MouseDown"/> <Image Grid.Column="1" Grid.Row="1" Name="image_prog1_slot1" Stretc...

Doubt with c# handlers?

I have this code in c# public void startRecognition(string pName) { presentationName = pName; if (WaveNative.waveInGetNumDevs() > 0) { string grammar = System.Environment.GetEnvironmentVariable("PUBLIC") + "\\SoundLog\\Presentations\\" + presentationName + "\\SpeechRecognition\\soundlog.cfg"; /*...

Basic tutorial for multithreading

Hi, I'm a coding newbie, but I really wanna learn how to do multithreading and event handling. Does anyone know of any good tutorials out there, or can they explain it to me in a nutshell? ...

jquery document level onmousedown gets called before element's click handlers

Hi, I am using jquery 1.3.2. I am registering two handlers as follows: $(document).onmousedown(dochandler) $('#element').click(elemhandler) When I click on #element both the handlers get called. And surprisingly dochandlers gets called before elemhandler. I have tried changing the orders of above handler registration, but no use. B...

event handling in C++

Hi. I'm writing a game in C++, and I'm trying to get it to recognize keyboard and mouse events. Google tells me that boost.signal is suitable for event handling, but none of the code samples or tutorials I've found tell me how to associate a keypress or mouseclick with a function. Can anyone shed any light on this? ...

Generate event, Swing

How can I generate event MouseWheelEvent for some Object? ...

Attached event triggering if event is same as current event

I have a button which start/stops a timer. When I click it, I remove the current event handler, and attach the opposite one. Ie, click "Stop", and the "Start" function is attached for the next click. However in IE (7), not sure about 8. The newly attached event is also triggering after the original function is finished: Lifeline in IE7...

Basic QT Event handling / Threading questions ?

Greetings , I am new to QT (4.6) and have some basic questions regarding its event mechanism.I come from Swing background so I am trying to compare it with QT. 1) Does Event-processing-loop run in seperate thread? (like EventDispatch thread in Swing) ? 2) If we open several 'QMainWindow' do they run in several threads? 3) Whats the be...

How to work with delegates and event handler for user control.

I have created a user control that contains a button. I am using this control on my winform which will be loaded at run time after fetching data from database. Now I need to remove a row from a datatable on the Click event of that button. The problem is that how do I capture that event in my form. Currently it goes in that user control...

handle htmlinputbutton click on the server

I have a simple htmlinputbutton of type "submit" in my aspx page. <input id="Submit1" runat="server" type="submit" value="submit"/> If I click it I want to handle this as an event on the server. Much like how a normal asp:Button would do. EDIT: I've tried the onserverclick thingy...it didn't work. Used onserverclick="foo" In my cod...

fire button event programatically

how to fire button event programatically ? ...

In wpf how to handle a event raised by a button inside user control in the page which uses that user control

Hi I am using MVVM architecture. I had created a user control which contains a button control. I want the click event of the button control to be captured in page which uses this user control. How to do this? Plase help :) ...

C++ Storing variables and inheritance

Here is my situation: I have an event driven system, where all my handlers are derived from IHandler class, and implement an onEvent(const Event &event) method. Now, Event is a base class for all events and contains only the enumerated event type. All actual events are derived from it, including the EventKey event, which has 2 fields: (...

Process Exited event not firing from within webservice

I am attempting to wrap a 3rd party command line application within a web service. If I run the following code from within a console application: Process process= new System.Diagnostics.Process(); process.StartInfo.FileName = "some_executable.exe"; // Do not spawn a window for this process process.StartInfo.CreateNoWindow = true; proc...

Event handler for "Clear All Panes" in Visual Studio output window

There are a few buttons associated with the Output window in Visual Studio (VS2005/2008/2010). One of them is "Clear All Panes". How can I install an event handler that's called when that button is clicked? I'm building a Visual Studio extensibility package, working in C#. ...

Can i access outer class objects in inner class

I have three classes like this. class A { public class innerB { //Do something } public class innerC { //trying to access objB here directly or indirectly over here. //I dont have to create an object of innerB, but to access the object created by A //i.e. innerB ...

AS3, Flex : update an Object at Event.ENTER_FRAME the correct way

Hi there! What is the best practice for updating an object at Event.ENTER_FRAME? here's the code: addEventListener(Event.ENTER_FRAME, enter_frame); protected function enter_frame(event:Event):void { //update the object in the exernal class Extrn.updaterMethode(anObject); // some logic if(foo==bar) { // get a property from t...