Implement EXE file inside a form
Implement EXE file inside a form
Implement EXE file inside a form
Implement EXE file inside a form
Implement EXE file inside a form
Implement EXE file inside a form Implement EXE file inside a form Implement EXE file inside a form Implement EXE file inside a form Implement EXE file inside a form Implement EXE file inside a form Implement EXE file inside a form Implement EXE file inside a form
Implement EXE file inside a form Implement EXE file inside a form
Implement EXE file inside a form
Go Back  Xtreme Visual Basic Talk > > > Implement EXE file inside a form


Reply
 
Thread Tools Display Modes
  #1  
Old 07-15-2012, 10:58 PM
khoahdbui khoahdbui is offline
Newcomer
 
Join Date: Jul 2012
Posts: 2
Default Implement EXE file inside a form


There was a post here about the same problem that I have:
Running EXE inside form
However, this problem was dealing with VB6 (I am using VB2010) and the code was much different. I tried but still couldn't figure out the right way.

Now I am trying to implement an EXE file (a rotating cube exe file) inside a form that can be open by a click. I don't want it to pop up a new window but instead inside a control box within a window (e.g a PictureBox control).

I have this code which can implement the notepad inside the form, but it cannot do that for the rotating cube exe file, it would pop up a new window.

Declare Auto Function SetParent Lib "user32" (ByVal hWndChild As IntPtr, ByVal hWndNewParent As IntPtr) As IntPtr
Dim MyPSI As New ProcessStartInfo("notepad.exe")
Dim MyProcess As Process = Process.Start(MyPSI)
MyProcess.WaitForInputIdle()
SetParent(MyProcess.MainWindowHandle, Me.Handle)

I have spent hours and I'm still stuck on this. Any help would be much appreciate.
Thank you.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Implement EXE file inside a form
Implement EXE file inside a form
Implement EXE file inside a form Implement EXE file inside a form
Implement EXE file inside a form
Implement EXE file inside a form
Implement EXE file inside a form Implement EXE file inside a form Implement EXE file inside a form Implement EXE file inside a form Implement EXE file inside a form Implement EXE file inside a form Implement EXE file inside a form
Implement EXE file inside a form
Implement EXE file inside a form
 
Implement EXE file inside a form
Implement EXE file inside a form
 
-->