I have an application that has a main form and uses an event handler to process incoming data and reflect the changes in various controls on the main form. This works fine.
I also have another form in the application. There can be multiple instances of this second form running at any given time.
What I'd like to do is have each insta...
So I am stuck with fixing/maintaining another programmers code (blech)
I am a firm professor of the rule "If it ain't broke dont fix it!" so depsite wanting to change something every time I come across horrendous code, I am keeping myself limited to only changing the absolute minimum amount of code possible to make the required fixes. ...
Hello,
I'm trying to dynamically add items to a toolstrip with the following code:
contextMenuStrip.Items.Add(string.Format("{0} kB/s", currSpeed), null, new EventHandler(Connection.SetSpeed));
The problem is that I need to pass a parameter to Connection.SetSpeed: currSpeed (int).
How can I do that?
Thanks for your time.
Best regard...
Hi All,
How can i determine in a web server control (inherited from linkbutton) if an event handler is set for OnClick or OnCommand?
I rather not override the events and set variables... etc
Thanks all in advance
...
I am having a bit of a problem adding a few check boxes and an event handler programatically. The check boxes all appear fine, but they don't do anything when clicked. Does anyone have any idea what I am doing wrong?
My code:
foreach (Statement i in theseStatements)
{
box = new CheckBox();
box.Text = i.S...
Hello Everyone,
I am trying to update an Image (_browserScreenshot below) object in XAML by changing the source image every time an event determines the source needs updating. Right now I have this:
public BitmapSource GetScreen()
{
Bitmap bitmap = new Bitmap(app.Browser.ClientRectangle.Width, app.Browser.ClientRec...
I have two functions bound to a click event at two different times (using jQuery). The order in which they are fired is significant. They are firing in the correct order. The problem is, when the first function returns false, the second function is still firing!
How can I properly cancel the event?
Example code:
$(document).click(f...
I'm wondering if there's a way to automatically stub in the Global.asax's event handlers? Thus far, I've not been able to find any examples of how to do this. Seems I have to just find the list of delegate names available to me and type them in manually.
Intellisense doesn't seem to lend any useful info on the subject either.
...
I have a number of Inherited User Controls, for each User Control I sometimes have overridden event Handlers for the Buttons on the Control. (To allow for Child specific behaviours to occur)
Is there a way of viewing all the Event Handlers associated with a particular component?
The problem being that on one of the Buttons, the event h...
I've come very close, I think, but can't seem to cover every single one of the fronts listed below:
disable use of backspace, delete, left arrow key, home key, and ctrl for various reasons (all of which prove difficult once you factor in the confusion caused by holding down two at the same time)
make certain that the user cannot exit t...
I'm developing a class library to be used for other developers and will be allowing them to either declare an instance of my class using WithEvents (or similar in other languages) as well as allow them to use Delegates defined in the class. Am I just being redundant here by doing it like this?
Public Delegate Sub TimerElapsedDelegate(B...
Here is my current situation:
I have a web page containing a couple scrollable divs. Each of those divs contains a number of objects. I am using YUI to display popup menus of actions that can be performed on each object. Each object has its own menu associated with it that is constructed and displayed dynamically. The popup menus can be...
Hello,
I'm new in windows application development using java. The question is this "How to i bind events to custom class methods?
As fas i have seen i can register listener classes to swing components to handle events. That is OK but i have to implement a class that implements e.g. the ActionListener interface to handle an event and t...
I want to use jQuery to detect clicks on a bunch of radio buttons. They have all been assigned a css class, foobar, to detect them. Easy, right? Still, this code doesn't work:
$("input.foobar").click(function ()
{
alert(this.id);
}
);
What wrong with the code above?
Does this.id really return the id of the current radio button?
...
I've got a user control that has an event that I can subscribe to. This works (ignore syntax):
protected void Page_Load(object sender, EventArgs e)
{
ucControl.Event += new Event(ucControl_Event);
}
but if I removed this line and put the event wire up in my aspx page, it doesn't work. Ex:
<uc1:ucControl id="uc_Control1" runat="ser...
Finding dead code in Delphi is usually real simple: just compile and then scan for routines missing their blue dots. The smart linker's very good about tracking them down, most of the time.
Problem is, this doesn't work for event handlers because they're published methods, which (theoretically) could be invoked via RTTI somehow, even t...
My page has a full screen flash object with a centered fixed content area (the rest background).
Without touching the flash source, I want to add "links" to set places within the content area to run script(s) (eg. ajax, event tracking) - similar to an image map.
Needed: - any page click compares the clicked x/y coordinates to a lookup ...
I just upgraded a hosted control to .NET 2.0 and I had to enable the ComVisible to access methods from the client side using javascript.
Should events also be accessible once I enable ComVisible? I was handling my events like this before with no issues:
<OBJECT id="foo" ...></OBJECT>
<script language="javascript">
function docume...
Hi there,
is there any event to be handled between the dom:loaded and load using Prototype javascript framework?
I've implemented a preloader using prototype which is looking like this:
Event.observe(window,"load",preload);
function preload(){
if($('wrapper'))
$('wrapper').setStyle({"display":"block"});
if($('loading'))
...
I have in my application a data template that has a few buttons.
I want those buttons' even handler to be fired in the current page (I am using this template in many pages) rather than in the Application.xaml.vb/cs file, since I want different actions on each page.
I hope I am clear.
...