events

Difference between a WebControl and a CompositeControl?

Hello! I have been looking around on the web and found some articles about the topic, but i still can't figure out the difference between them. I have the code show below, if i inherit from a CompositeControl it works perfectly but not if i inherit from a WebControl. (They both render the code, but only the CompositeControl handles the ...

Event aggregator and collections

Hi, i want to use an event aggregator to syncronize my viewmodel with the view (the viewmodel ovservs the model), this is very simple to implement in the model, simply call notify on the setters of the properties. but it gets more complicated when the model has collections. where should be the code which will call notify? what would be ...

C# - Make form semi-transparent while moving

Is there any way to make the form semi-transparent while it is being moved and then become opaque when it's not being moved anymore? I have tried the Form_Move event with no luck. I'm stuck, any help? ...

Developing Games - How are things that take more than one game loop performed?

I'm using C#, but this is applicable to developing a game in any language. Most games use a 'game loop', which would look something like this: while (game is running) { UpdateEnvironment(); DrawEnvironment(); } I'm struggling to understand how things which would take more than one game loop fit into the equation. For example, mak...

How do I know when a file has been modified in a VBA Macro?

Is there a way to watch a file in VBA (which is essentially VB6), so that I know when the file has been modified? -- similar to this only I don't want to know when a file is unused, just when its modified. The answers I've found have recommended using "FileSystemWatcher" and the Win32 API "FindFirstChangeNotification". I can't figure ou...

When TextBox TextChanged event is fired ?

My question is : As we know ViewState is not responsible for storing and restoring TextBox,CheckBox and such controls Values. This is done by LoadPostData() method to controls that implement IPostBackDataHandler interface. And we also know after Load stage,RaisePostBackEvent stage occurs and raise corresponding events such Button Click...

Events in an Inversion of Control (Dependency Inversion) system go which way?

Up or Down? I'm a very visual person. I'm thinking of my application as a hierarchy, where the top is the root and the bottom is a leaf. I'm also under the understanding that IoC containers are ignorant of their contained objects' responsibilities/functions. Instead, the contained objects know about their container, i.e. "context", via...

Make the OnMousedown event to be triggered only after the OnBlur event is triggered

We have a HTML screen that is formed by including the two sections below: Footer - A bar with icons that includes an Update button. The update button has the onmousedown event associated with it. When the Update button is clicked the data present in the Body is saved in the database. Body - HTML form with 2 input fields. Each of thes...

handling central data buffer for many processes in C++

I ran into the following problem and cannot decide how to proceed: I have a class, Reader, getting a chunk of data every 1/T seconds (actually the data is from video frames, 30 frames per second). The chunks are to be passed to several objects, Detectors that process the chunks and output a decision. However, the number of chunks that ...

PRISM and WCF - Do they play nice?

Ok, this is a more general "ugly critters in the corner" question. I am planning to start a project on WCF and PRISM. I have been playing around with PRISM some time know, and must say, I like it. Solid foundation for applications with nice possibilities to grow. Now I want to incorporate WCF and build a distributed application, with o...

onKeyDown not always called in Android app

I've created a simple android game, based on the Lunar Lander sample, and I'm having a problem with handling key events. When the activity starts, the only keys that onKeyDown or onKeyUp get called for are the dpad up/down/left/right keys. Neither the menu, back, or dpad_center keys trigger onKey methods. However, once I've pushed one...

jquery click handler

I create a bunch of tags dynamically, appending them to a I then add a click handler... $(document).ready(function(){ // ... code to append <a> tags to nav div $("#nav a").click(function(event){ alert('Clicked '+event.target.id); return false; }); }); If I have 10 tags as a result of this and clic...

VB6 binary compatibility - adding new Events

In a VB6 ActiveX exe project, is there any way to preserve the GUID for the events dispinterface if and when new events are added? Obviously changing existing events breaks compatibility. Adding a new one doesn't cause the VB6 IDE to issue a warning. This doesn't really surprise me, though, as it also doesn't warn when you add new metho...

Having difficulty updating object properties in basic actionscript program

I'm still working my way through some pretty basic Actionscript programming (in Flex), and I'm getting a little caught up with events and object properties. I've got 3 files below, one application and two components. The basic goal is very simple - start out with two location canvases and one player canvas. When clicking in one locati...

Detect when autocomplete is visible

I am catching the enter on keypress in my form to prevent it from submitting the form unless it is the last input; otherwise, it acts as a tab (finds the next input and focuses on it). Any ideas on how to not trigger event.preventDefault() if the browser auto-complete is being selected? ...

How to access Drag-EventHandler from external class

Hi! I have a UserControl that contains another UserControl. Like this: <HeaderedContentControl Grid.Row="2" Header="New A" DataContext="{Binding NewA}" Template="{StaticResource NewAResource}"> The outer UserControl has elements which I can drag. The embedded UserControl has a TextBox to which I want those elements to be ...

Writing a maintainable commit method

I have a ViewModel that encapsulates some properties that are being edited in an options dialog. I can't actually save them to the settings until they hit the Ok button, which will end up calling Commit on this particular ViewModel. A single property in my ViewModel looks like this: public bool SomeProperty { get { ret...

Winforms: Is there a way to be informed whenever a form gets opened in my application?

I have a "Switch to window" button on my main form that I'd like to be enabled only when other windows (in my app) are open. Is there some sort of event that is raised whenever a form is opened or closed that my main form can hook? (For example, perhaps some sort of way to track when Application.OpenForms has changed?) (I understand tha...

How to inject script to listen for activeX events?

HI, I've trying to listen for events fried by my ATL object. I find that if I include a script as follows directly in the HTML of the page it picks up the event correctly. <html> <head> <script event="genericScriptEvent(param0, param1, param2, param3, param4, param5, param6, param7, param8)" for="CMyControl" type="text/javascript"> ...

Fire an event when Collection Changed (add or remove)

Hi all, I have a class which contains a list : public class a { private List<MyType> _Children; public Children { get {return(_Children);} set {_Children = value ;} } } I want to create an event and fire that event whenever my list (_Children here) is changed for example an item is added to it or removed from it or it's cleared . tha...