DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Chris Guest

    Can API call VB function?


    My main goal:
    To create a generic display box that can call a custom function when its

    "OK" button is clicked. Basically, the idea is to allow a MsgBox type
    window to appear while NOT blocking the thread's capability to process
    events and whatnot.

    My current solution:
    Use the API call SetTimer to trigger a function I specify using the
    "AddressOf" operator.

    Problems:
    The process to kill the timer is sloppy and not gaurunteed to work 100%.
    There is no way of including extra parameters with this technique.

    Question:
    Is there a way to call a VB function through API asychronously without
    using this SetTimer? I assume there are other API calls that VB can use
    its AddressOf function, I just can't find them. I'm sure it has something
    to do with "Hooking"?

    Any clues on how to set this up?
    Thanks!!

    Chris

  2. #2
    Karl E. Peterson Guest

    Re: Can API call VB function?

    Hi Chris --

    Let's look at the root of this problem.

    > Basically, the idea is to allow a MsgBox type
    > window to appear while NOT blocking the thread's capability to process
    > events and whatnot.


    In an EXE, a MsgBox doesn't block many events (like _Paint, _Timer, etc.).
    Obviously, it will block things like _Click. Can you confirm that your problem still
    exists in an EXE, and if so be more specific on the definition of "whatnot"? <g>

    Thanks... Karl
    --
    [Microsoft Basic: 1976-2001, RIP]


    "Chris" <carlinopsu@yahoo.com> wrote in message news:3c7d0562$2@10.1.10.29...
    >
    > My main goal:
    > To create a generic display box that can call a custom function when its
    >
    > "OK" button is clicked. Basically, the idea is to allow a MsgBox type
    > window to appear while NOT blocking the thread's capability to process
    > events and whatnot.
    >
    > My current solution:
    > Use the API call SetTimer to trigger a function I specify using the
    > "AddressOf" operator.
    >
    > Problems:
    > The process to kill the timer is sloppy and not gaurunteed to work 100%.
    > There is no way of including extra parameters with this technique.
    >
    > Question:
    > Is there a way to call a VB function through API asychronously without
    > using this SetTimer? I assume there are other API calls that VB can use
    > its AddressOf function, I just can't find them. I'm sure it has something
    > to do with "Hooking"?
    >
    > Any clues on how to set this up?
    > Thanks!!
    >
    > Chris



Bookmarks

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
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links