Home > Software engineering >  Very urgent!!!!! How to add exe program in form1 framework.
Very urgent!!!!! How to add exe program in form1 framework.

Time:11-02

A ready-made program (in addition to the exe file and DLL, dat file), in order to want the function of the program, now the only way to go is the exe embedded in the form to show effect,
Seek to add detail steps and code,

Thank you very much,

Please do not copy content on baidu, I already all searched, no scientific solutions,

CodePudding user response:

It is unrealistic to other application UI shown in your form is not difficult, but your program can't communicate with off-the-shelf programs, including data and function of communication, for example, you want to be a software of drawing functions, you want your program to provide data for these two programs, then this program will image data after the flush draw back to your own programs, or directly displayed, is can't do like this, even if do it, or use memory and thread injection method, very trouble. Another possible, but I haven't much support this technology application, OLE,

If the ready-made program is OLE server, then you can through the OLE technology to add a reference to him in VB, which like action object through code that software operation, for example, the Word, you can be in VB [quote] window will Word. Exe, added the Word's program, and then use the provided by the Application, the document object operations such as Word, this is because the Word of the program itself is OLE server, he provides procedures and functions and data communication interface between the can try in VB [quote] window click browse, find exe then try to add him, if can the exe is likely to be OLE, if prompt can't load is certainly not OLE

However, if you say me as long as the ready-made in the software interface embedded in his own form, do not need to function and data communication, it is good to the implementation, ideas are as follows:

(1) first of all, you need a handle "finder", baidu search this word has a heap of
(2) start your existing software, for example, you want to put the software "ABC [XXX]" window inserted in your program, use the handle to query device to capture this window (handle basic usage of query, press a button, and then move the mouse to need to form, finder will to check the data in the window, didn't find this function, change a), check the window class name, this is the part 1, 2, the primary purpose of
Findwindow (3) statement in your own programs API function (specific statement baidu "findwindow")
Findwindow (4) call function is introduced to find the name of the class before as a parameter, the API function can be found in accordance with what you give the class name of the window, and returns a handle to the window and see if returned to handle and to query device, the same can do down,
(5) statement in your own programs API function SetParent function (specific statement baidu "SetParent")
6 call SetParent function, will own a handle to the window (for example, is a handle to the window Form1 Form1. The attributes of the HWND value) and to handle as two parameters passed into the function, can be reset "ABC [XXX]" the window of the parent window of the window to you, so that "ABC [XXX]" window is embedded into your window,

Basically said that, but think you should want two programs have data or the function of communication, because you said "to want the function of the program," that if not OLE give it up, basically can't, or wait for more advanced great god ~ ~

CodePudding user response:

reference 1st floor JiLuoXingRen response:
this is not realistic, to other application UI display in your form is not difficult, but your program can't communicate with off-the-shelf programs, including data and function of communication, for example, you want to be a software of drawing functions, you want your program to provide data for these two programs, then this program will image data after the flush draw back to your own programs, or directly displayed, is can't do so, even if do it, or use memory and thread injection method, very trouble. Another possible, but I haven't much support this technology application, OLE,

If the ready-made program is OLE server, then you can through the OLE technology to add a reference to him in VB, which like action object through code that software operation, for example, the Word, you can be in VB [quote] window will Word. Exe, added the Word's program, and then use the provided by the Application, the document object operations such as Word, this is because the Word of the program itself is OLE server, he provides procedures and functions and data communication interface between the can try in VB [quote] window click browse, find exe then try to add him, if can the exe is likely to be OLE, if prompt can't load is certainly not OLE

However, if you say me as long as the ready-made in the software interface embedded in his own form, do not need to function and data communication, it is good to the implementation, ideas are as follows:

(1) first of all, you need a handle "finder", baidu search this word has a heap of
(2) start your existing software, for example, you want to put the software "ABC [XXX]" window inserted in your program, use the handle to query device to capture this window (handle basic usage of query, press a button, and then move the mouse to need to form, finder will to check the data in the window, didn't find this function, change a), check the window class name, this is the part 1, 2, the primary purpose of
Findwindow (3) statement in your own programs API function (specific statement baidu "findwindow")
Findwindow (4) call function is introduced to find the name of the class before as a parameter, the API function can be found in accordance with what you give the class name of the window, and returns a handle to the window and see if returned to handle and to query device, the same can do down,
(5) statement in your own programs API function SetParent function (specific statement baidu "SetParent")
6 call SetParent function, will own a handle to the window (for example, is a handle to the window Form1 Form1. The attributes of the HWND value) and to handle as two parameters passed into the function, can be reset "ABC [XXX]" the window of the parent window of the window to you, so that "ABC [XXX]" window is embedded into your window,

Basically said that, but think you should want two programs have data or the function of communication, because you said "to want the function of the program," that if not OLE give it up, basically can't, or wait for more advanced great god ~ ~

At night to write so many hard,

I do not want to achieve the function program I can use it directly,

It's just a shell directly, only in this way,

CodePudding user response:

Then listen to the 1st floor SetParent once, at the same time pay attention to when the main forms change size child form match well, too, as well as the main form notice child form closed shut off

CodePudding user response:

1 Lord murphy will in VB. The Form inside to realize a Windows xp virtual machine? !

CodePudding user response:

VB control external window for your child form
Is this meaning

CodePudding user response:

reference 5 floor dxd0128 reply:
VB control external window for your child form
This is the meaning of


Is this meaning,
Solution,

The other program is exe file with DLL file, and after I RES is generated by the resource manager how to release

CodePudding user response:

 shell (" ABC. Exe ") 

CodePudding user response:

B: ok, just listen to 1/f, SetParent.

Own an MDIFORM, put the EXE window as a child window come in with respect to OK,

CodePudding user response:

Didn't you say that function, you can put inside the window page, put the flash, but just can not put the application,

CodePudding user response:

refer to 6th floor zhail response:
...

The other program is exe file with DLL file, and I how to release after the RES is generated by the resource manager


Added in the resource editor 'custom resources can put those. Exe,. DLL added to the inside,
Then your program starts, LoadResData () to the dynamic byte array,
From an array of bytes written to disk file, written in Binary mode, this okay with you,
Those files are written to the same folder, you can Shell to run it,
(if it still has some directories and subdirectories inside the file, pay attention to the 'relative path to the same as the original)
  • Related