DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: VB6 Controlling Another APP

  1. #1
    Join Date
    Jul 2006

    VB6 Controlling Another APP

    Ok, now I am stumped on this one, maybe someone has an idea.

    I am writing a program to automate and add functions to an external program.

    The external app has a toolbar that has a button for messages. When you click on the toolbar button another form with a toolbar and a grid that shows the messages in a database.

    My application adds a button to the toolbar of the messages form. When the user clicks the button i added it deletes records from datbase. The grid does not reflect the changes. If you click "QUIT" on the toolbar, it closes the messages form, if I click the messages button the messages form opens and the records i deleted are no longer shown. The only way to refresh the grid is to close and reload the form.

    So i decided to have my application close the form and reopen it.

    I did the following. I found handle to the toolbar, i sendmessage WM_LBUTTONDOWN, and WM_LBUTTONUP with X,Y values to click the quit button. Then i send the WM_LBUTTONDOWN, and WM_LBUTTONUP messages with the X,Y values to click the Messages button on the main application window.

    The messages window closes, then it reopens. But the records I deleted are still showing up, however, if i manually click the quit button and then the button to open the message form, the messages form opens with the records gone.

    Can anyone explain why it works by manually clicking the buttons but not through the code? Or does anyone have any suggestions on how to make this work?

    Thanks, David

  2. #2
    Join Date
    Aug 2004
    Crosby Texas
    I think it is because the quit button is removing it from memory.

    You could change your code to simulate a manual click on the quit button.
    Last edited by LABYRNTH; 07-23-2006 at 08:07 AM.

  3. #3
    Join Date
    Apr 2006
    make another call the the database to refresh the grid

Similar Threads

  1. VB6 app to call a VB.Net app
    By bemcdonald in forum .NET
    Replies: 2
    Last Post: 05-04-2005, 03:44 PM
  2. updating xml file from VB6
    By smithg22 in forum VB Classic
    Replies: 9
    Last Post: 04-12-2005, 06:23 PM
  3. Send Notifications from .NET to VB6
    By Peter Oravec in forum .NET
    Replies: 0
    Last Post: 03-30-2005, 02:24 AM
  4. Reading stdout from VB6
    By tiamatloc in forum VB Classic
    Replies: 6
    Last Post: 03-15-2005, 03:45 PM
  5. Replies: 3
    Last Post: 07-21-2001, 02:32 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center