Results 1 to 12 of 12

Thread: Subclassing

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 1999
    Location
    Guayaquil, Guayas, Ecuador
    Posts
    87

    Question

    How can i subclass an external application like calc?

  2. #2
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    I think you can only subclass apps that are set up to be so, as active x objects. Why would you need to sublcass the Calculator? Why not just do the calculations in VB? If you mean just starting it from within your program then you can just Shell or ShellExecute.

  3. #3
    Hyperactive Member
    Join Date
    Nov 1999
    Posts
    363
    I've been trying to do the same thing for a long time. You can subclass within your own thread, but when you look at an external app, the AddressOf operator with VB isn't enough. You need C++ or a third-party tool such as Spyworks. Hope this changes in vb7.
    Wade

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Sep 1999
    Location
    Guayaquil, Guayas, Ecuador
    Posts
    87
    I don't need to subclass the calc, it was just an example.
    What i realy need to do is to click a dynamic menu of an external application and i thought that if i subclass it and see what msg send that menu i will be able to send that msg to tha app and click it.

    Thanks anyway


    PD: WadeD i see arround ther that you have a dll in c that do something like what i want
    can you give it to me or help me doing that??

  5. #5
    Hyperactive Member
    Join Date
    Nov 1999
    Posts
    363
    If you get the MenuID, you can use SendMessage without looking up the message.
    Wade

  6. #6

    Thread Starter
    Lively Member
    Join Date
    Sep 1999
    Location
    Guayaquil, Guayas, Ecuador
    Posts
    87
    WadeD:
    yes i try that but the getmenu doesn't work
    it seem to be a menu created at runtime or something like that
    it is a right click menu

  7. #7
    Hyperactive Member
    Join Date
    Nov 1999
    Posts
    363
    Controls are windows also. If you can get the handle to one of the controls used to get the pop-up menu and use that as the window handle for GetMenu, you should be able to get the menu handle.
    Wade

  8. #8

    Thread Starter
    Lively Member
    Join Date
    Sep 1999
    Location
    Guayaquil, Guayas, Ecuador
    Posts
    87
    I just try it but doesn't work
    I think that the menu is created in the instant that i right click program.
    So i think that the only way is to see the message of that menu and send it.

  9. #9
    Hyperactive Member
    Join Date
    Nov 1999
    Posts
    363
    I'm using Desaware Spyworks (from the guy who wrote the VB Programmer's guide to API - Dan Appleman) which uses a dll in c++. But that's because I need to intercept certain messages while the user is in that process. For your purpose, you just need to capture the message once. Try Spy++ that comes on the VB cd. Then you can use SendMessage.
    Wade

  10. #10
    Addicted Member
    Join Date
    Feb 2000
    Posts
    224

    FREE SUBCLASSING CONTROL !!!

    HI guys,

    I Use a free subclasing control from softcircuits programming.(http://www.softcircuits.com).

    It is really free and pretty easy to use. The package also
    includes 8 demonstration of the control.


    Now go get it .. .

    ftp://ftp.softcircuits.com/vbsrc/subcls32.zip

    ----

  11. #11

    Thread Starter
    Lively Member
    Join Date
    Sep 1999
    Location
    Guayaquil, Guayas, Ecuador
    Posts
    87
    WadeD: can you send me that Desaware Spyworks to try if it works please.

  12. #12
    Hyperactive Member
    Join Date
    Nov 1999
    Posts
    363
    Antonio, it's an entire CD. Check it out at Desaware.
    Wade

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