Consider this scenario. I have an object, lets call it.... Foo. Foo raises a simple event named "Loaded". As part of the information for the event, consumers will need to know which foo object raised the event. Our team has adopted the following pattern.
1) Create a new class that inherits from EventArgs - for example,
FooEvent...
Is there an event that is fired when the user presses the close button?
This is because the Window Closing event is fired both when one closes the window manually (with the Close method) and also when the user presses the [X] button...but I somehow need to know only when the user presses the [X] button not when the window is closed manu...
My application generally running on 10-20 threads and these threads sending events to the GUI to the update certain controls almost every seconds.
When the user close the application middle of these, all updates related with these events causes several random crashes. Mostly ObjectDisposedException and NullReferenceException.
Since the...
I'm trying to get JQuery to highlight an element based on the link ID selector
For Example
<a href="#thisid">Goto Element with ID name</a>
Highlights the element below.
<div id="thisid" class="isNowHighlighted">FooIsCoolButNotBetterThenBar</div>
Iv tried searching for relevant plugins but no joy. Any ideas?
...
I am not very familiar with databases and what they offer outside of the CRUD operations.
My research has led me to triggers. Basically it looks like triggers offer this type of functionality:
(from Wikipedia)
There are typically three triggering events that cause triggers to 'fire':
INSERT event (as a new record is being inserted...
The D-Bus specification says that
D-Bus is.. a simple way for applications to talk to one another... Currently the communicating applications are on one computer...
I would like something like D-Bus but to work across multiple Linux machines, and there may be firewalls involved. For example, if my mail server decides it receives a...
In WPF we have routed events. When should these be used instead of regular events?
...
Hi,
I am working on a chat client using a socket, and I want a certain code to be executed before the window closes when the user clicks on "X" (like closing the connection properly).
Can I do that without having to implement all the abstract methods in WindowListener?
/Avin
...
Can anyone tell me how to raise click event of button control (or for that matter for any event).
Platform: .net 2.0/3.0/3.5
Language: c#
Domain: Windows Application, WinForms, etc.
...
How would you suggest the best way of avoiding duplicate event subscriptions? if this line of code executes in two places, the event will get ran twice. I'm trying to avoid 3rd party events from subscribing twice.
theOBject.TheEvent += RunMyCode;
In my delegate setter, I can effectively run this ...
theOBject.TheEvent -= RunMyCode;
t...
Hi everybody, I'm new around here and i have a little problems with a C# application.
I want to capture the key down event. This wasn't a problem at first but after i added some buttons to the form, the key down event of the form ignores the arrow keys and moves the focus from one button to the next.(The key up event works) Is there a w...
I would like to generate a list of events and methods assigned to them in a given BCB project. Is there a way to do this?
...
I wanted to have some radio buttons that disabled when the mouse went over and enabled again when it went out (just for fun).
<form>
<input type="radio" name="rigged" onMouseOver="this.disabled=true" onMouseOut="this.disabled=false">
</form>
When the mouse goes on it it does what it should be when it goes back off the button wont re-e...
I would move my former js codes to more OOP style. Here's the code.
function addEvent( obj, type, fn ) {
if ( obj.attachEvent ) {
obj['e'+type+fn] = fn;
obj[type+fn] = function(){obj['e'+type+fn]( window.event );}
obj.attachEvent( 'on'+type, obj[type+fn] );
} else
obj.addEventListener( type, fn, false );
}
function ...
I'm wondering if there is a defined standard for what the default action is of various HTML elements. I've looked at the W3C's HTML specification and while they are very precise with what attributes can be used with elements (and also some behavioural stuff such as exactly what gets included with form submission) there's nothing about t...
Hi,
I want to make my hyperlinks act like buttons (only respond to Click event) however, they change the history token automatically when you click on them, which messes up my history mechanism in my application. Is there a way to suppress the default behaviour of the hyperlink so it doesn't change the history token? I tried setting tar...
I watched a few threads here,mostly used this:
window.onbeforeunload = function (e) {
var e = e || window.event;
//IE & Firefox
if (e) {
e.returnValue = 'Are you sure?';
}
// For Safari
return 'Are you sure?';
};
but seems this will mix the situation of refreshing page and close page,
is there any possibility to distinguis...
We are building a HTML edit control using a VB6 wrapper around the WebBrowser control and MSHTM documents. We are having problems detecting if the document has been modified by the user.
VB6 does not support using the IHTMLChangeSing and IHTMLChangeLog interfaces so these seem to be non-starters.
What other events from either the WebB...
I am working on new functionality for a large C# project which is mostly legacy code.
The area that I'm working on handles XML schema messages, creates a schedule for their transmission and places them into some legacy timer code which notifies me when they should be sent.
Although I am new to them, Visual Studio test projects are provi...
code:
LinkButton linkButton = new LinkButton();
linkButton.OnClientClick="changecolor";--i need to change this to on mouse focus event
there is no property for for link button like we have onClientClick.
...