| CodeGuru Home | VC++ / MFC / C++ | .NET / C# | Visual Basic | Newsletters | VB Forums | Developer.com |
|
|
|||||||
| Visual Basic .NET Microsoft Visual Basic .NET and related questions. |
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Attaching To Existing 3rd Part ActiveX Application
We have a client who has asked us to write a GUI that is capable of connecting to an existing, running application. This specific application has quite extensive .NET and ActiveX hooks in it, but it's a third-party application and we do not have access to the source code. The client has specified VB 2008, despite the fact that the target application has perfectly good GUI creation tools itself.
I can successfully start a separate instance of the target application, but that is not what the client wants. The idea is that the user would start this application, open a specific file with it and then start the GUI which would take control. I have searched a number of locations (including 18 pages so far of this forum) to try to find help on this sort of thing, but the success is slow coming. One code snippet enabled me to find the running process, which may help me to connect. I am also browsing CodeProject to try to wind useful information on this. Does anybody have pointers to good information that might speed up my search? Thanks, Geoff |
|
#2
|
|||
|
|||
|
Re: Attaching To Existing 3rd Part ActiveX Application
Oh yes, the GUI still has to be able to continue running if the third-party application is not installed.
|
|
#3
|
||||
|
||||
|
Re: Attaching To Existing 3rd Part ActiveX Application
How about some details? No two programs are the same, and some aren't allowed to discuss here
__________________
David CodeGuru Article: Bound Controls are Evil-VB6 101 Samples: VB & C# VS2008 Samples CodeGuru Reviewer 2006 Dell CSP 2006, 2007 & 2008 MVP Visual Basic If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!
|
|
#4
|
|||
|
|||
|
Re: Attaching To Existing 3rd Part ActiveX Application
Hi David,
The target application is National Instruments' TestStand. It has a significant amount of documentation and a number of available interfaces, including Interop APIs. What I'm looking for are clues to the type of calls I should be looking at. Have other people done similar things with other applications? If so, how? What calls did they use? Once I see some examples, I can look for similar examples in the NI-supplied interfaces. As I said, TestStand has excellent GUI-building capabilities, particularly when allied with the underlying LabVIEW language. However, our clients are insisting on VB. NI do provide examples, but the code they provide can only open a new instance of TestStand. Connecting to an already-running instance is proving somewhat obscure for me. Regards, Geoff |
|
#5
|
||||
|
||||
|
Re: Attaching To Existing 3rd Part ActiveX Application
Well, if they have API's, that's probably the best way to interact. That's how we talk to Google, and Facebook, and a bunch of sites.
__________________
David CodeGuru Article: Bound Controls are Evil-VB6 101 Samples: VB & C# VS2008 Samples CodeGuru Reviewer 2006 Dell CSP 2006, 2007 & 2008 MVP Visual Basic If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!
|
|
#6
|
||||
|
||||
|
Re: Attaching To Existing 3rd Part ActiveX Application
Could you please specify what kind of connection.
Are you trying to automate this existing application? Here are some common API functions that could be called. Code:
FindWindow FindWindowEx SendMessage PostMessage ShowWindow MoveWindow Code:
For Each p As Process In Process.GetProcesses
MessageBox.Show(p.ProcessName)
Next
__________________
[2003] [2005] Be sure to run the following examples with the "Start without debugging" button, since the debugger causes the code to behave differently. UAC(User Account Control) | On Screen Keyboard | Shutdown Manager| SendKeys(With directive focus) | WaitToComplete(.wav) | Hide from Task Manager | Control Ctrl+Alt+Delete, Win+Keys, and Alt+F4 | AlwaysOnTop | Hide Taskbar | Simple "On screen keyboard" | Pin to start menu(VB6) | Pin to start menu(NET) | VB2005 without SP2 | Remove TitleBar menu items | SwapKeyboardKeys | Disabled MenuStrip bug fix | Aero Vista/7 | Flip3D TopMost Vista/7 |
![]() |
| Bookmarks |
|
||||||
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|