Firing a RaiseEvent
-
Is there some way to cause a RaiseEvent in an ActiveX EXE to fire with out using the firing of some other event as the trigger ? Every example of a RaiseEvent that I have been able to find uses a timer to fire it. The books go on to warn that it is necessary to kill the timer when you're done with it and that there could be other programs that are using it and killing it can strand them. The same problem applies if you use a form whether it contains a timer or whether you use a click event or something. Of course it's possible to write code to check to see if any other programs are using it, but that of course is also not foolproof. Also, is there any other way for an ActiveX EXE to initiate contact with a client (or multiple)? :confused: I posted this befor but somehow screwedup the subject so it made no sence .
-
Is there some way to cause a RaiseEvent in an ActiveX EXE to fire with out using the firing of some other event as the trigger ? Every example of a RaiseEvent that I have been able to find uses a timer to fire it. The books go on to warn that it is necessary to kill the timer when you're done with it and that there could be other programs that are using it and killing it can strand them. The same problem applies if you use a form whether it contains a timer or whether you use a click event or something. Of course it's possible to write code to check to see if any other programs are using it, but that of course is also not foolproof. Also, is there any other way for an ActiveX EXE to initiate contact with a client (or multiple)? :confused: I posted this befor but somehow screwedup the subject so it made no sence .
firefalls wrote: Is there some way to cause a RaiseEvent in an ActiveX EXE to fire with out using the firing of some other event as the trigger ? Sure! All that's required is a RaiseEvent statement. It doesn't have to be inside an event handler for some control. You could put it in a loop, if you wanted, or any other construct. I've put them in puzzle solving code that uses RaiseEvent to notify of status changes. This was done inside of a LONG running solver loop running on a seperate thread (VB.NET.) firefalls wrote: Also, is there any other way for an ActiveX EXE to initiate contact with a client (or multiple)? Define "contact"? Is the client running some sort of server that our ActiveX must use? Your "clients" must be listening for something in order to respond to your ActiveX's request for a connection. RageInTheMachine9532
-
firefalls wrote: Is there some way to cause a RaiseEvent in an ActiveX EXE to fire with out using the firing of some other event as the trigger ? Sure! All that's required is a RaiseEvent statement. It doesn't have to be inside an event handler for some control. You could put it in a loop, if you wanted, or any other construct. I've put them in puzzle solving code that uses RaiseEvent to notify of status changes. This was done inside of a LONG running solver loop running on a seperate thread (VB.NET.) firefalls wrote: Also, is there any other way for an ActiveX EXE to initiate contact with a client (or multiple)? Define "contact"? Is the client running some sort of server that our ActiveX must use? Your "clients" must be listening for something in order to respond to your ActiveX's request for a connection. RageInTheMachine9532
What ??????????????????????????????????????????????? Then how do I do that ?????????????? ........... I asked the question, not just because I do not find any other examples in the books (or other guide sources) but because I have tried to do this numerous times in the past few months, my clients just do not respond to the RaiseEvent unless it IS part of an event handler which is executing due to its event having been fired. (But even when it is part of an event handler, the client still ignores the RaiseEvent if the event handler is executing due to having been called from somewhere else even if that is another event handler) Also, I am using VB 6 rather than VB.net I have no idea whether that makes a difference are not I did not think it was supposed to but... So, can you help me please thank you... John
-
What ??????????????????????????????????????????????? Then how do I do that ?????????????? ........... I asked the question, not just because I do not find any other examples in the books (or other guide sources) but because I have tried to do this numerous times in the past few months, my clients just do not respond to the RaiseEvent unless it IS part of an event handler which is executing due to its event having been fired. (But even when it is part of an event handler, the client still ignores the RaiseEvent if the event handler is executing due to having been called from somewhere else even if that is another event handler) Also, I am using VB 6 rather than VB.net I have no idea whether that makes a difference are not I did not think it was supposed to but... So, can you help me please thank you... John
It should work without any problems. Let me take a look at the code you've got. Send me what you've got and I'll see what I can find out. RageInTheMachine9532
-
It should work without any problems. Let me take a look at the code you've got. Send me what you've got and I'll see what I can find out. RageInTheMachine9532
Send you what I have............ OK.......... One: send it where? I clicked on the e-mail link at the bottom of your first response and attempted to send something to you, but there was never any reply. I am assuming that for some reason it never got to you though I have no idea why. Or should I just go ahead and posted below this? I am new to this site and don't really know how it all works. Two: what I have is very little because most of what I had was on a second hard drive which fairly recently died (completely and without warning, all of a sudden its controller card would no longer recognize it) thanks for your help so far.