Timer in a DLL?



  • hi guys,

    i wanna implement a routine,which will be executed at a specific time interval, in a DLL.

    That is quite simple, if I write a windows form application. Because I can use the Timer component from the tool box.

    But how can I implement the timer in a Dll?

    Any help will be appreciated.

    bag



  • Use the Timer class manually.
    (There are 3 System.Windows.Forms.Timer, System.Threading.Timer, and...)

    If using in confunction with GUI things, i suggest to use the one from System.Windows.Forms, otherwise the other one.

    simon

    Edit:
    BTW you can have at the generated code by the visual studio designer.



  • theta schrieb:

    Use the Timer class manually.
    (There are 3 System.Windows.Forms.Timer, System.Threading.Timer, and...)

    If using in confunction with GUI things, i suggest to use the one from System.Windows.Forms, otherwise the other one.

    simon

    Edit:
    BTW you can have at the generated code by the visual studio designer.

    Hi

    thanks theta. I have implemented the Timer in DLL successfully. Now another problem arised. The timer triggled function in DLL must be in type void. So how can I return the string values, which created in the timer triggled function in DLL, to the exe application?

    Do u have any idea? or any one know? How can I return values at every seconde for example from my dll to the exe application?

    Regard,

    Bag


Anmelden zum Antworten