Questions tagged [raiseevent]

76 questions
2
votes
4 answers

Code conversion from c# to vb.net including eventhandlers

Hello I have found a great class written in c# which I would like to use in a VB.NET project. I found it in this thread: C# : Redirect console application output : How to flush the output? The C# Class looks like this: using System; using…
1
vote
2 answers

How to raise event from user control to another form vb.net

I am not familiar with user controls. I have user control with OK and Cancel buttons, I add this user control to an empty form during run time, I have another form which I called "Main Form", In the code I open the empty form and add the user…
Areej Qadomi
  • 143
  • 1
  • 1
  • 14
1
vote
2 answers

sub functions vs event, what is the difference?

I went through events in Vb.net and i found they are really an amazing feature..but still confused about how to use them effectively. The real doubt is that the functions and sub could be effective alternative for events. Whatever i do with events i…
1
vote
1 answer

How to "AddHandler" trying to catch an event from an external library

I want to call a function as soon as an event from an external library occurs. I have an array of camera objects (different cameras) which create an event as soon as they grab an image (triggered externally). The cameras are defined by an external…
Martin S
  • 15
  • 4
1
vote
1 answer

how to raise event in all the object of my class?

I have C# class for which I am creating multiple objects for that class. Now, I have one event for which all the objects of that class needs perform operation(In other words, I need to call specific function of all the object for that event). The…
H. Mahida
  • 2,356
  • 1
  • 12
  • 23
1
vote
2 answers

Raise Events Custom Control Class which Inherits Base Class

I'm trying to design a "pass-through" for the axShockwaveFlash control. This control does not have .MouseDown, .MouseUp or .MouseMove events associated with it. Sadly, I need to detect these events on any shockwave controls as they are used in…
stigzler
  • 793
  • 2
  • 12
  • 29
1
vote
1 answer

Trying to fire events from a Class that is within a Dictionary instantiated on the MainForm

Trying to have events raised within a class be received within the MainForm when this class is within a Dictionary. Here are some code samples. Created a Class: Public Class Zone Public _ZoneID As Integer Public _ZoneName As String Public Event…
1
vote
0 answers

Custom control raiseevent did not fire event (VB.net)

I have custom control with n buttons, clicking button will change the variable 'state' and fire the stateChanged event, so in the main form I just put that custom-control and handle program with myCustomControl1_stateChanged sub. Public Class…
1
vote
1 answer

Is there any performance overhead in using RaiseEvent in .NET?

Is there any performance overhead in using RaiseEvent in .NET? I have a code which is similar to following. Dim _startTick As Integer = Environment.TickCount 'Do some Task' Dim duration As Integer = Environment.TickCount -…
Sachin Chavan
  • 5,578
  • 5
  • 49
  • 75
1
vote
2 answers

Custom Control Events in C#

I'm trying to create a custom control and need to raise an event from it. The idea is to raise an event at the end of the click event (OnAfterClick). I found one or two tutorials on doing this, but am clearly missing a step somewhere; I have the…
Paul Michaels
  • 16,185
  • 43
  • 146
  • 269
1
vote
3 answers

How Do You Raise an Event With a Parameter?

I've recently started working with C# after working with VB.Net for a while. In VB.Net you can raise an event with parameters that you pass in. For example Event TileMoved(ThisTile As Tile) Private Sub Button1_Click(sender As System.Object, e As…
Ste Moore
  • 107
  • 1
  • 10
1
vote
1 answer

Visual Basic: killing the process of an Application Object

In Visual Basic I create an Application Object and start it: gApp = New CANoe.Application gMeasurement = gApp.Measurement gApp.Open(arrArgs(0), False, False) gMeasurement.Start() Once the application finishes processing the data two possible…
arthur
  • 1,034
  • 2
  • 17
  • 31
1
vote
1 answer

RaiseEvent between User Controls where there are multiple instances of the same controls on one page ASP.net

I have a problem where I'm trying to send a string between User Controls, "input.ascx" and "output.ascx", when I have more the one of each User Control. Here is the ASPX for the parent page:
Steinar Snær
  • 21
  • 1
  • 6
1
vote
1 answer

vb.net possible to monitor raise events across applications?

I may have gone crazy... but I am hoping there is a way to do this. I have a base class that has event handling in it. My console application is running my workflow. Part of that workflow is to raise events at specific intervals in a separate thread…
RiddlerDev
  • 7,370
  • 5
  • 46
  • 62
1
vote
0 answers

Err raised on validation how can i exit

I have a certain webform that collects user information in my webpage when the user hits the save button it calls a function save() in my dbEngineClass. Now when the user enters duplicate data i raise a certain error and handle it in the web page…
nayef harb
  • 753
  • 1
  • 10
  • 19