Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Can I pick the size and position of an avi file?
Hi Guys, the code below was kindly posted by Michel Pierron...
It works fine, but I really wanted it to run in it own window so the spreadsheet can be seen behind the avi...How do I adjust the code to do this? can I pick the avi window size/position? Thanks for any help.... ste Private Declare Function mciSendString Lib "winmm.dll" _ Alias "mciSendStringA" (ByVal lpstrCommand As String _ , ByVal lpstrReturnString As Any, ByVal uReturnLength As Long _ , ByVal hwndCallback As Long) As Long Sub FullScreenAvi() Const aviFile = "C:\Clock.avi" ' Modify as appropriate Dim Cmd As String Cmd = "play " & aviFile & " fullscreen " mciSendString Cmd, 0&, 0, 0& End Sub |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Can I pick the size and position of an avi file?
something like;
Declare Function mciSendString _ Lib "winmm" _ Alias "mciSendStringA" ( _ ByVal lpstrCommand As String, _ ByVal lpstrReturnStr As Any, _ ByVal wReturnLen As Long, _ ByVal hCallBack As Long) _ As Long Declare Function GetActiveWindow Lib "USER32" () As Integer Const WS_CHILD = &H40000000 Sub PlayAVIFile() Dim CmdStr As String, FileSpec As String Dim Ret As Long, XlShwnd As Long 'The name and location of the AVI file to play. FileSpec = "C:\AVI\Files\E-Mail\Scanemail.avi" 'Get the active sheet's window handle. XlShwnd = GetActiveWindow() 'Opens the AVIVideo and creates a child window on the sheet 'where the video will display. "Animation" is the device_id. CmdStr = ("open " & FileSpec & " type AVIVideo alias animation parent " & _ LTrim(Str(XlShwnd)) & " style " & LTrim(Str(WS_CHILD))) Ret = mciSendString(CmdStr, 0&, 0, 0) 'Put the AVI window at location 50, 50 relative to the 'parent window (Microsoft Excel) with a size of 260 x 160. Ret = mciSendString("put animation window at 50 50 260 160", 0&, 0, 0) 'The wait tells the MCI command to complete before returning 'control to the application. Ret = mciSendString("play animation wait", 0&, 0, 0) 'Close windows. Ret = mciSendString("close animation", 0&, 0, 0) End Sub (ste mac) wrote in message . com... Hi Guys, the code below was kindly posted by Michel Pierron... It works fine, but I really wanted it to run in it own window so the spreadsheet can be seen behind the avi...How do I adjust the code to do this? can I pick the avi window size/position? Thanks for any help.... ste Private Declare Function mciSendString Lib "winmm.dll" _ Alias "mciSendStringA" (ByVal lpstrCommand As String _ , ByVal lpstrReturnString As Any, ByVal uReturnLength As Long _ , ByVal hwndCallback As Long) As Long Sub FullScreenAvi() Const aviFile = "C:\Clock.avi" ' Modify as appropriate Dim Cmd As String Cmd = "play " & aviFile & " fullscreen " mciSendString Cmd, 0&, 0, 0& End Sub |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Can I pick the size and position of an avi file?
Ivan, all I can say it THANKS... perfect...
seeya ste |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Pictures and Text Boxes print in wrong position and size in 2007 | Excel Discussion (Misc queries) | |||
Fix size and position of comment | Excel Discussion (Misc queries) | |||
File Size With Macros Has Increased From Its Origina Size | Excel Discussion (Misc queries) | |||
Window Position & Size | Excel Discussion (Misc queries) | |||
Auto-Size and Position Pictures with a Macro ? | Excel Programming |