General information
Category:
ActiveX controls in VFP
Hi Ellai,
>hi guys!!!
>
>I tried using a multimedia control on a form and it works great on audios but my problem is with using video files. When video file is loaded it launches a new form. What i want is for it to be embeded in my form . Is that possible?
As Malcolm eluded to, there's an example in the Samples.vcx that comes with the latest MSDN download. How they achieve the functionality you are seeking is by capturing the handle to the new window and setting it's dimensions to the same dimensions as their form. FWIW, they work with the multimedia control thru API calls and not the ActiveX. Here's a snippet:
* Get Handle of the form with FOXTOOLS.FLL
cur_window = _WhToHwnd(_WOnTop())
*!* Get the window handle of the window playing the video
cCmd = "status " + cAlias + " window handle wait"
hWin = INT(VAL(THIS.doMCI(cCmd)))
*!* Once we have the window handle, we need to position
*!* the video window to be the same position and size
*!* as our player rectangle on the form
x1Pos = THIS.LEFT
y1Pos = THIS.TOP
x2Pos = x1Pos + THIS.WIDTH
y2Pos = y1Pos + THIS.HEIGHT
*!* Use the SetWindowPos Windows function to set position and size
setWindowPos(hWin,0,x1Pos,y1Pos,x2Pos,y2Pos,0)
*!* Everything's done, let's show the video
cCmd = ("WINDOW " + cAlias + " state show")
THIS.doMCI(cCmd)
HTH,
Jon
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