[RESOLVED] Run a program in a program...
Alright, i have a very very simple TFTP server program that i was going to try and recreate, but i was wondering...is there some way i could imbed or like run inside my program so the end user will not see it? Or some way i could run the program and hide it until the transfer completes then close it?
Any help, or suggestions are appreciated!!
Thanks!
Re: Run a program in a program...
You can use SetParent api - there are many samples posted on the forum.
The following two functions (at least) you will more likely need:
Code:
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As Long, ByVal lpWindowName As Long) As Long
Private Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long
Re: Run a program in a program...
Ok thanks set parent worked, but how would i go about hiding it so it's not visible at all? And can i just kill that process and then it will end the program running in my program?
Re: Run a program in a program...
You will need another 2 APIs if you want to hide and/or destroy it:
Code:
Private Const SW_HIDE = 0
Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Private Declare Function DestroyWindow Lib "user32" (ByVal hwnd As Long) As Long
Re: Run a program in a program...
Awesome, thanks for the help!
Re: [RESOLVED] Run a program in a program...
Re: [RESOLVED] Run a program in a program...
Another quick question, not really important but is there some way to like tie the other .exe file to the one i will create, so there will be only 1 file not two? I could always just zip the files together, just curious if it's possible
Re: [RESOLVED] Run a program in a program...
Re: [RESOLVED] Run a program in a program...
You can "bind" or "join" 2 EXE files into 1 so they execute at the same time. I'm not sure if the mods want this discussed here though since a lot of people use it to bind a virus/trojan to a legit program.
Re: [RESOLVED] Run a program in a program...
Could you PM me some information on that? I want to try and do it with a tftp server program i have...
thanks`