Get Window Handle, Working With API
Posted on 2010-04-02
I'm new to working with an API, and I need to send it a handle to my calling application main window.
In my VB project, I'm trying to make a link to a C++ API via my Form, Form4. At current, I've placed a call to the function to make a link to the API in the Button.Click() sub for each button I click on that does something. I'm currently passing it a handle like this each time:
What I'd like to do is establish the connection once by clicking on a certain button, and have the connection still work each time I click any other button on my form. At current, I've only been able to make it work by re-establishing the connection in each Button.Click() sub for each button I want to click on that will do different things with the API. I'm wondering how I would go about doing this once. Am I not passing the right handle to my form?