Results 1 to 9 of 9

Thread: Need Code example of a CallBack Procedure.

  1. #1

    Thread Starter
    PowerPoster Arc's Avatar
    Join Date
    Sep 2000
    Location
    Under my rock
    Posts
    2,336

    Need Code example of a CallBack Procedure.

    It would be really cool if someone could make a small project that employees a call back procedure so as i can learn the purpose of and understand the way to use CallBacks

    Much appreciated!
    -We have enough youth. How about a fountain of "Smart"?
    -If you can read this, thank a teacher....and since it's in English, thank a soldier.


  2. #2
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    The best example is the Coffee project on the MSDN discs.

    Here are some good links also though:
    http://www.vbforums.com/showthread.p...lbacks+example

    Actually that was the best one. Really though nothing beats that Coffee example.

    The problem is that callbacks aren't really needed that often, they are basically a why to provide and/or share events from an object that can not direct support events. Maybe because you have to declare it in a standard module, or a new instance can not be created, or something along that line. So I can do up a little sample of just how to do callbacks but it wouldn't appear very useful without a scenerio that needed it.

    I'll try anyway though....

  3. #3
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    Here I had this it is an example of sharing the same instance of an activeX exe with multiple applications, but it also uses callbacks for events. Remember to register (or run once) the ActiveX exe before you try the Test exe. Of course the source is all there too.

  4. #4

    Thread Starter
    PowerPoster Arc's Avatar
    Join Date
    Sep 2000
    Location
    Under my rock
    Posts
    2,336
    Thanks Edneeis i'll check those out
    -We have enough youth. How about a fountain of "Smart"?
    -If you can read this, thank a teacher....and since it's in English, thank a soldier.


  5. #5

    Thread Starter
    PowerPoster Arc's Avatar
    Join Date
    Sep 2000
    Location
    Under my rock
    Posts
    2,336
    OK, I tried the Coffe program and i ran it and it worked and everything but i have no clue what i am supposed to learn from it. I mean it has like 4 different projects with timers and DLl's etc...


    I know a callback can be implemneted much simpler than that. I just can't get a grasp on it with all that extra stuff thrown in...


    Can anyone supply just a very basic bare bones nothing but example of a call back?

    I know it's something like, I create a DLL, then another DLL or EXE creates an instance of that DLL and then cals a method from there which in tiurn creates another DLL....and on and
    -We have enough youth. How about a fountain of "Smart"?
    -If you can read this, thank a teacher....and since it's in English, thank a soldier.


  6. #6
    Hyperactive Member
    Join Date
    Apr 2002
    Location
    uk
    Posts
    327
    This will teach you how to do it. Beware, its highly technical:
    http://www.visualbasicforum.com/show...threadid=26521

    Here is another method - less teaching more framwork bare bones code:
    http://www.visualbasicforum.com/show...threadid=26152

  7. #7

    Thread Starter
    PowerPoster Arc's Avatar
    Join Date
    Sep 2000
    Location
    Under my rock
    Posts
    2,336
    Cool thaks alot Chief. i'll check it out
    -We have enough youth. How about a fountain of "Smart"?
    -If you can read this, thank a teacher....and since it's in English, thank a soldier.


  8. #8
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    That COM Interface plugin tutorial Rocks the Hzouse!

  9. #9
    Hyperactive Member
    Join Date
    Apr 2002
    Location
    uk
    Posts
    327
    Written by an extremely knowledgeable friend over at www.visualbasicforum.com, it does indeed "rock the house". I especially like the demonstration of true event handling.

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