Small AVI does not appear as original size 
Author Message
 Small AVI does not appear as original size

Hi,

I am trying to get a small AVI to play within my app.  My AVI is about
the size of Netscape's or IExplorer's little gizmo to tell you browser
is working(48 x 48).  I tried all possible multimedia controls to play
this file and I have the same problem over and over again : height of
animation is fine but width is stretched to about twice the size of the
original.

I have noticed that opening this AVI in windows multimedia control was
doing the same thing.  However, the Active Movie Control opens it fine
in windows but it craches under VB.  I get a GPF whenever I use this
Active Movie Control.

Have any ideas ?  Know why this control crashes ?

Thks in advance
Teri

And sorry, its another AVI question... frequent flyer in this group...



Mon, 22 Jan 2001 03:00:00 GMT  
 Small AVI does not appear as original size
Have you tried to bypass the multimedia control and use a picture box?
Here is how you can do it:

Put this in the declaration section of form or module:
'For Playing Multimedia files
Declare Function auxGetVolume Lib "winmm.dll" (ByVal uDeviceID As Long,
lpdwVolume As Long) As Long
Declare Function mciGetDeviceID Lib "winmm.dll" Alias "mciGetDeviceIDA"
(ByVal lpstrName As String) As Long
Declare Function mciSendCommand Lib "winmm.dll" Alias "mciSendCommandA"
(ByVal wDeviceID As Long, ByVal uMessage As Long, ByVal dwParam1 As Long,
ByVal dwParam2 As Long) As Long
Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA"
(ByVal lpstrCommand As String, ByVal lpstrReturnString As String, ByVal
uReturnLength As Long, ByVal hwndCallback As Long) As Long
Declare Function midiOutGetVolume Lib "winmm.dll" (ByVal uDeviceID As Long,
lpdwVolume As Long) As Long
Declare Function midiOutSetVolume Lib "winmm.dll" (ByVal uDeviceID As Long,
ByVal dwVolume As Long) As Long
Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal
lpszSoundName As String, ByVal uFlags As Long) As Long
Declare Function waveOutGetVolume Lib "winmm.dll" (ByVal uDeviceID As Long,
lpdwVolume As Long) As Long
Declare Function waveOutSetVolume Lib "winmm.dll" (ByVal uDeviceID As Long,
ByVal dwVolume As Long) As Long
Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan As
Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
Declare Function BitBlt Lib "gdi32" (ByVal hDestDC As Long, ByVal X As
Long, ByVal Y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal
hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal dwRop As
Long) As Long
Declare Function GetSystemMetrics Lib "user32" (ByVal nIndex As Long) As
Long

Type lVolType
    v As Long
End Type

Type VolType
    lv As Integer
    rv As Integer
End Type

Const SM_CXBORDER = 5
Const SM_CYBORDER = 6
Const VK_SNAPSHOT As Byte = &H2C
Const SRCCOPY = &HCC0020 ' (DWORD) dest = source
Const MCI_SET = &H80D
Const MCI_SET_DOOR_OPEN = &H100&

'Place a picture contol on your form and size it as you wish.
'make sure the Autodraw property is set to true. Set the Autosize property
'to false.

'This is the code to play you AVI file
Picture1.Picture = LoadPicture("")  'clear old picture
Picture1.Visible = True
rs = Space$(128)
A$ = 'put the AVI file's full path and filename here...Variables are best
i = mciSendString("open AVIvideo!" & A$ & " alias movie parent " &
Picture1.hwnd & " style child", rs, 128, cb)
If i Then MsgBox "Error! Files does not appear to be a valid .AVI movie
file."
i = mciSendString("play movie", rs, 128, cb)

'Here is how to stop the AVI file
    rs = Space$(128)
    i = mciSendString("stop movie", rs, 128, cb)
    i = mciSendString("close movie", rs, 128, cb)

Good luck,
Tim Hirtle

Quote:

> Hi,

> I am trying to get a small AVI to play within my app.  My AVI is about
> the size of Netscape's or IExplorer's little gizmo to tell you browser
> is working(48 x 48).  I tried all possible multimedia controls to play
> this file and I have the same problem over and over again : height of
> animation is fine but width is stretched to about twice the size of the
> original.

> I have noticed that opening this AVI in windows multimedia control was
> doing the same thing.  However, the Active Movie Control opens it fine
> in windows but it craches under VB.  I get a GPF whenever I use this
> Active Movie Control.

> Have any ideas ?  Know why this control crashes ?

> Thks in advance
> Teri

> And sorry, its another AVI question... frequent flyer in this group...



Wed, 24 Jan 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Vertical Scrool Bar Does not appear when sized to 255 x 255

2. CRViewer in form stays too small (do not use the hole form size)

3. MDE Bloats back to original MDB size?

4. Original size of bitmap

5. 'TODO doe snot appear to work.

6. small avi-files for animation of wait screens?

7. VB4/Win95-HELP: MMcontrol.OCX doesn't issue a DONE event after playing AVI

8. Making a dokument, not refering to original template.-

9. problem using component with asp page -- result of function not returned, instead original value returned

10. small font sizes

11. Help; Field Size to Small

12. How to run vb aplications on platforms with big and small font sizes

 

 
Powered by phpBB® Forum Software