events

How to detect when the scrollbars appear? C#

Is there a way or an event to solve this? well specifically its for a flow layout panel ...

Blocking until an event completes

How can you block until an asynchronous event completes? Here is a way to block until the event is called by setting a flag in the event handler and polling the flag: private object DoAsynchronousCallSynchronously() { int completed = 0; AsynchronousObject obj = new AsynchronousObject(); obj.OnCompletedCallback += delegate {...

After onbeforeunload event

I am tracking the window close/navigation event thru following code. window.onbeforeunload = winClose; function winClose() { if (isDataChanged) { return "Are you sure you want to close?"; } } This obviously will popup a confirmation with OK / Cancel. when the browser is closed. Here i want t...

How to reliably capture Windows logon, logoff, lock and unlock events from a service?

using Microsoft.Win32; public class App { static void Main() { SystemEvents.SessionSwitch += SystemEvents_SessionSwitch; Console.ReadLine(); SystemEvents.SessionSwitch -= SystemEvents_SessionSwitch; } static void SystemEvents_SessionSwitch(object sender, SessionSwitchEventArgs e) { if(e.Reason == Ses...

VB.NET: Building an Event Manager - Listeners

I'm in the research stage of a project that will require the development of a custom event manager for computer game events. In the past, the routing code for polling the correct pieces of code for event consumption has been placed entirely within the Event Manager's ProcessEvents() function. Example: The UI needs to be provided the o...

Trace PRISM / CAL events (best practice?)

Ok, this question is for people with either a deep knowledge of PRISM or some magic skills I just lack (yet). The Background is simple: Prism allows the declaration of events to which the user can subscribe or publish. In code this looks like this: _eventAggregator.GetEvent<LayoutChangedEvent>().Subscribe(UpdateUi, true); _eventAgg...

Does it make sense to dispatch events from another object?

I'm still trying to get my head around the best way to structure event flows. Someone made a lot of sense by telling me that contained objects should be decoupled from their parent containers so they're reusable between containers. Instead of calling their parent's function, they dispatch an event. Sensible! I recently myself in the awk...

How can I wait for one event out of a list of events in specman?

I have a struct in specman: struct foo_s { event foo_ev; // some code that will emit foo_ev sometimes }; And a list: var foo_l: list of foo_s; // later code will manage the list And now I want to sync on any of the foo_ev events in the list: first of { sync @foo_l[0].foo_ev; sync @foo_l[1].foo_ev; sync @foo_l...

Alternate of C# Events in Java

hi. I am .Net developer. i want to know that is there any event handling mechanism in Java for Events Handling like C#. what i want to do is i want to raise/fire an event form my class upon some condition. and consumer of this class should register that event and write event handling method. this can be done easily in C#. i have to im...

firefox toolbar event

Hi All, Does anyone know who to find an event occurrence on a toolbar in firefox. I want to do event logging on toolbar in firefox. Thanks ...

Understanding C# Events use of sender object

I am reasonably new to C# as a language (coming from a C++ background) and I am currently in the process of writing an application that makes use of an event driven API. Primarily this consists of registering event/response handlers and starting event monitors then dealing with these asychronous events/responses. The thing i'm having a...

C# dynamically add event handler

Hi i have a simple question. here is my code: XmlDocument xmlData = new XmlDocument(); xmlData.Load("xml.xml"); /* Load announcements first */ XmlNodeList announcements = xmlData.GetElementsByTagName("announcement"); for (int i = 0; i < announcements.Count; i++) { ToolStripMe...

Button in UpdatePanel requires two clicks to fire

Hi, I am using VB.NET and Webforms with MS AJAX. I have a button in an MS AJAX Update Panel. When the page is loaded the button's visibility is set to 'false' declaratively. After the user has checked a check box (also in the UpdatePanel), I set the button's visiblity to true and it becomes visible as expected. However, the user has ...

Set DisplayObject to pass on MouseEvents

I have a Sprite I want to use as a debug layer. So I would like to overlay this layer over the normal scene and draw to it. This is fine except for that it blocks all MouseEvents from the layers below. Is there a way I can set an InteractiveObject to allow MouseEvent objects to "pass through" and onto the InteractiveObjects below? ...

fire event in actionscript on swf load?

I am trying to get a bit of content to load on pageLoad instead of as a clickable event (but still keep the clickable event on the menu). Here's the actionscript: import mx.utils.Delegate; /** * This is the menu that comes up at the bottom with various analysis and navigation options when a thumbnail is selected. */ class imagegal....

Binding jQuery UI Selectable events

How can I bind selectable events after the selectable has already been initialized? To start, I have: $("#the-items").selectable({ filter: "> tbody > .item" }); Then I tried binding (.items are loaded dynamically): $("#the-items").bind("unselecting", function(){ alert("!"); }); $(".item").live("unselecting", function(){ aler...

GC start and stop events

Hi, Isn't it possible to get an event when the GC begins? I want to time each individual GC so I can see if pauses in my server are due to GC or something else. The GC pauses all .NET threads while running, right? (Except the thread that it runs on, of course). How about unmanaged threads? Thanks! ...

Combobox's Dynamic event in flex

Hello everyone.. I am using flex when i was select combobox item i want to create new form for eg. when i select 1 it will appear one form when i select 2 it will appear two.so and so.... ...

MySQL call a stored procedure every x minutes

Is there a way in MySQL to call a stored procedure from within SQL every x minutes? I want to use this in a session-environment, where the database keeps track of all the sessions and automatically deletes sessions older than x minutes. ...

How would I go about detecting onclick events external to a particular iframe?

I have a page that has a bunch of different iframes (A, B, C, D) - all of which are fully visible at all times. Together, they make up the various portions of my application's UI. One of these iframes, iframe D - houses another, smaller iframe (iframe X) that is sometimes made visible by a user action. It should automatically disappear w...