What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » VB running exes.

VB running exes.
Author: Message:
mwe99
Veteran Member
*****

Avatar

Posts: 2514
Reputation: 67
36 / Male / Flag
Joined: Jul 2004
O.P. VB running exes.
Okay Im starting a project in VB.

I already have a .exe file that i want to include in it.

However i made it an OLE object, my question is, is there a way i can run this exe, get data from it and then put it in the VB form?
08-19-2005 01:45 PM
Profile PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: VB running exes.
Why would you want to run a seperate exe? You could just add the forms from the second exe into the first one and call it that way. Or what is the second EXE supposed to do and did you make it?

If you didn't make the second exe what you can do is load it as a resource into your program. (At work right now will post how to do it later)

But the code to run it would be the following.

code:
Dim File() As Byte
Dim x As Long
File() = LoadResData(101, "CUSTOM")
Open App.Path & "\Test.exe" For Binary Write Access As #1
Put #1, , File()
Close #1

'This gets the ProcessID of the program if you need to use it later
x = Shell(App.Path & "\Test.exe")

Use the Windows API to read the text from the window and so on.

This post was edited on 08-20-2005 at 07:39 PM by matty.
08-20-2005 07:30 PM
Profile E-Mail PM Find Quote Report
mwe99
Veteran Member
*****

Avatar

Posts: 2514
Reputation: 67
36 / Male / Flag
Joined: Jul 2004
O.P. RE: VB running exes.
i didnt make it, its a game -  tetrix.exe

so when i click a button or make it load auto but using VB

This post was edited on 08-20-2005 at 07:32 PM by mwe99.
08-20-2005 07:31 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On