General information
Category:
Coding, syntax & commands
Here is one way to do it. I used to use this to pop up VFP data entry forms within VB and C++ apps so they could do some databased work with a real database tool.
*-- Down and dirty window parent setting
*-- Launch the VB app with ShellExecute or CreateObject, etc.
*-- Declare the API functions
DECLARE integer FindWindow IN WIN32API STRING, STRING
DECLARE INTEGER SetParent IN WIN32API integer, integer
*-- Get the window handle of a running application.
*-- FindWindow() is a quick way if you know the window title.
*-- It has to be the exact title of the window.
*-- EXAMPLE -> hWord = FindWindow(0,"MyDoc.doc - Microsoft Word")
hWord = FindWindow(0,"MyVB Apps Window")
*-- Call SetParent() with the window handle of the window to move and the
*-- parent window, in this example, VFP itself.
SetParent(hWord, _vfp.hWnd)
Gary
>By "launching within a window" I mean a visual foxpro window. Just as one can do with the Web browser control. Launching internet explorer within a vfp window.
>
>I want it to be contained inside a vfp window. Not just launching it as an external program.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only