Results 1 to 4 of 4

Thread: Timers in a class

  1. #1

    Thread Starter
    Need-a-life Member Mc Brain's Avatar
    Join Date
    Apr 2000
    Location
    Buenos Aires, Argentina
    Posts
    6,808

    Timers in a class

    Is there any way to create a timer in a class. SetTimer does not seem to work, since I need a module to use AddressOf. Any ideas?
    Emiliano F. Martín


    If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
    Encourage the person who helped you to keep doing it, and give him the points he deserves.


    MP3 Organizer: Freeware to logically organize all your MP3s.

  2. #2
    G&G Moderator chemicalNova's Avatar
    Join Date
    Jun 2002
    Location
    Victoria, Australia
    Posts
    4,246

    Re: Timers in a class

    SetTimer doesn't work in a class?!

    Have you tried just using say, your own Timer, by using GetTickCount()? Are you sure you are using SetTimer correctly?

    Phreak

    Visual Studio 6, Visual Studio.NET 2005, MASM

  3. #3

    Thread Starter
    Need-a-life Member Mc Brain's Avatar
    Join Date
    Apr 2000
    Location
    Buenos Aires, Argentina
    Posts
    6,808

    Re: Timers in a class

    Quote Originally Posted by «°°phReAk°°»
    SetTimer doesn't work in a class?!

    Have you tried just using say, your own Timer, by using GetTickCount()? Are you sure you are using SetTimer correctly?

    Phreak
    ---------------------------
    Microsoft Visual Basic
    ---------------------------
    Compile error:

    Invalid use of AddressOf operator
    ---------------------------
    OK Help
    ---------------------------
    MSDN says:

    AddressOf procedurename

    The required procedurename specifies the procedure whose address is to be passed. It must represent a procedure in astandard module module in theproject in which the call is made.
    Emiliano F. Martín


    If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
    Encourage the person who helped you to keep doing it, and give him the points he deserves.


    MP3 Organizer: Freeware to logically organize all your MP3s.

  4. #4

    Thread Starter
    Need-a-life Member Mc Brain's Avatar
    Join Date
    Apr 2000
    Location
    Buenos Aires, Argentina
    Posts
    6,808

    Re: Timers in a class

    More from MSDN...

    Although you can use AddressOf to pass procedure pointers among Basic procedures, you can't call a function through such a pointer from within Basic. This means, for example, that aclass written in Basic can't make a callback to its controller using such a pointer. When using AddressOf to pass a procedure pointer among procedures within Basic, theparameter of the called procedure must be typed As Long.
    Emiliano F. Martín


    If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
    Encourage the person who helped you to keep doing it, and give him the points he deserves.


    MP3 Organizer: Freeware to logically organize all your MP3s.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width