Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can RUN window appear inside a VFP window?
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01137462
Message ID:
01138912
Views:
13
Hi Alex,

Here's what happens:

- VFP application issues RUN command

- OS creates a window with class "ConsoleWindowClass" and with -- most likely -- "FoxPro Run Command" caption

- OS starts a process inside the console window

At this point VFP application should call FindWindow API function
DECLARE INTEGER FindWindow IN user32;
	STRING lpClassName,;
	STRING lpWindowName
passing either "ConsoleWindowClass" class name or "FoxPro Run Command" caption, or both as input parameter(s). The handle returned can be used for following SetParent call. The RUN shold be NOWAIT, otherwise the VFP application may halt until the issued RUN returns.

BTW, there's no guarantee that SetParent would work with console windows. On other occasions I found them to be very special animals :)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform