Can API call VB function?


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Can API call VB function?

Hybrid View

  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



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


   Development Centers

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