|
|
|
To retrieve the original size of an AVI file that you've already opened with the mciSendString API function you can use this command |
Notice that in this case you've to pas a non-null RetString and his length in the second and third parameter respectively. When the function returns, it will contain the four coordinates (X1 Y1 X2 Y2) of the area used by the movie, for instance "0 0 320 240"
indicates that the width is 320 and height 240 pixel. To extract this information you must extract the null terminated string out of the buffer, and then parse the result. If you're using VB6 you can write a concise code that does it as follows: ' extract the null-terminated string |
Click here to copy the following block | RetString = Left$(RetString, InStr(RetString & vbNullChar, vbNullChar) - 1)
Dim res() As String res() = Split(RetString)
width = CSng(res(2)) height = CSng(res(3)) |
|
|
|
Submitted By :
Nayan Patel
(Member Since : 5/26/2004 12:23:06 PM)
|
|
|
Job Description :
He is the moderator of this site and currently working as an independent consultant. He works with VB.net/ASP.net, SQL Server and other MS technologies. He is MCSD.net, MCDBA and MCSE. In his free time he likes to watch funny movies and doing oil painting. |
View all (893) submissions by this author
(Birth Date : 7/14/1981 ) |
|
|