|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Windows Service and OCXI recently attempted to incorporate an OCX into a .net windows service
using .net framework 1.1 The ocx failed to perform as expected, meaning the OCX events failed to execute. I specifed the withevents clause in my declaration. When the same ocx is copied onto a windows form, everthing works great. Is there some way I can use the OCX inside of a windows service? It would save me development time. Any ideas would be helpful. Thank you. igor wrote:
> I recently attempted to incorporate an OCX into a .net windows service ActiveX controls require a message pump to fire there events. There is> using .net framework 1.1 > The ocx failed to perform as expected, meaning the OCX events failed to > execute. I specifed the withevents clause in my declaration. > > When the same ocx is copied onto a windows form, everthing works great. > > Is there some way I can use the OCX inside of a windows service? It > would save me development time. > > Any ideas would be helpful. > > Thank you. no message pump in a windows service. One way around this is to call Application.Run() on the thread is created on to start a message pump. You will probably also have to make sure that your threads are STA threads as well or you may have interesting results accessing the ocx. You may experience problems using Application.Run in a service... I haven't tried it myself - but I use this method to use COM components in console apps on occassion (which have the same issue with regards to com events). -- Tom Shelton
VB.Net Timer Issue
Problem With DoEvents ADO.NET Problem write or wrong Launching Web site for help Cross: Access speed Small question? vbc : error BC30420: 'Sub Main' was not found in 'Product'. Is it necessary to close a local OleDbDataReader before exit function? VB Smart Devivce Programming Changing user interface |
|||||||||||||||||||||||