While waiting for answers to my other post I tried to play with a video control. It gives me an error I cannot understand:
cFileName
= JUSTSTEM (JUSTFNAME (cLine)) THISFORM.O_VIDEOPLAYER1.cfilename = cLine THISFORM.O_VIDEOPLAYER1.playvideo (cFileName,100,100)cLine is the complete path to an .AVI file.
The error is that "no parameter statement is found"
Is anybody familiar with this control
Thanks.

video control
Laurent Kempé
Choose Tools | Task Pane from the menu to open the Task Pane Manager.
In the button bar at the top, click on Solution Samples. If you don't see it, click the chevron (double arrow) button to expand the list.
Once you're in the Solution Samples page, you have easy access to nearly 200 samples. They range in what they do, but they're all designed to show off a single feature, so that they can be easily understood.
Tamar
C4jun
Cetin hi,
Thanks very much BUT... I went over there and could not see anything after a more careful exam. I missed one directory yesterday but still it does not have what you are talking about. Apparently you are talking about "C:\Program Files\Microsoft Visual FoxPro 9\Samples\API"
It would be helpful if you could post the FILENAMES with extensions for those API's you are talking about (for videoplayer). I do not even need the directories where they are. I will find them in a snap after that. If the file names are literally what you've said: "Play an AVI file in an ActiveX control" and "Play multimedia files using MCI commands" I most definitely do not have them anywhere in my computer! I wonder why I do not remember if I installed SP1 or not, maybe that is the reason
I did find a bit of useful stuff in one directory--a table of API functions "examples.ftp"
Also upon more careful exam, I think I can use "oleword.scx." I am trying to get a hang of it now. I may consult with you on some details later.
"(1) If a table is open and there is a field with same name it takes precedence and the result is a bug that is hard to catch."
I've had this problem already at least three times. Wasted at least 15 min every time to find out what was afoot. I see, a little bit of theory won't not hurt. I simply changed the variables. SO, field names are prefixed by "m." Is it what you are saying
Well, my major unresolved problem, perhaps the only one remaining in FoxPro for me, is deployment of my apps. After that I am a free man.
Many thnaks.
Greg C
One of them is:
..\samples\solution\forms\mci_play.scx
other one is:
..\samples\solution\ole\mmsample.scx
and here is a sample code using videoframe from samples.vcx:
PUBLIC
oFormoForm = CREATEOBJECT('Form')
oForm.NewObject('myVideoPlayer', 'videoFrame', ;
_samples+'classes\samples.vcx')
oForm.myVideoPlayer.VideoFile = _samples+'SOLUTION\FORMS\FOX.AVI'
oForm.Show
"Field names is prefixed with m." NO. It's not what I'm saying. Memory variables are prefixed with m.
first_Name = "Alex"
use employee
first_Name && implicitly prefixed with alias-same as employee.first_Name
m.first_Name && prints Alex
quan170165
"Does PlayVideo() method of that object really expect a parameter " - yest, it does! Three parameters, as a matter of fact.
(1) an Alias - I do not really understand what it means. The MSDN Help does not define any aliases that are related to file names at all. I examined the control in the class browser and it told me that in place of an alias a file name might be accepted as the worst case scenario. It sounded quite weird, as a matter of fact. So I put in the file name, or rather its stem.
The other two parameters are numeric and they denote some properties of the .AVI file. The video player wants to know the length of the "video" and if it needs to start at the beginning or some point down the road. I will try to examine this file with dumpbin.exe tomorrow. Perhaps it will give me some information.
(2) I want to know about this mysterious "m." thing. I found it in my form in a place which was not written by me. It appeared like a wizard generated code. I could not understand it at all. I actually wanted to write a special post about it. This is the statement:
THIS
.previouskey = m.vNewValI found it in .PreviousKey_assign method. I have no clear recollection how I started this form which now has hundreds of controls and thousands lines of code. It is possible I took one of the samples or templates or something. It could have come from there. I want to know what kind of object it is.
I want to conclude this post, and I will explain it more explicitly to Tamar, that my aspirations to learn FOXPro theory are stricly limited. I am actually almost done with my education. I clamor for practical, useful tricks. I have learned a great deal here, you could hardly believe it. I am greatful for the help you have offered but I have to keep going. FoxPro is just a means for me. I will be doing just fine with incomplete picture.
Many thanks.
Roland86
"There at least 2 samples for playing media."
I just checked. It seems there is only one. It is also different from what I've got. It is a videoframe, not videoplayer. I could not see any code either.
The samples are not really instructional. There is a lot of redundancy in there. I could not see any OLE or ActiveX stuff. Combinations of forms and tables for the most part. Some buttons here and there. I have seen some of that stuff before. Tonight I took another look. It was disappointing.
Thanks.
Doug M
I just did it.
oForm.myVideoPlayer.VideoFile = _samples+'SOLUTION\FORMS\FOX.AVI'
oForm.Show
It is gorgeous. The globe appeared from nowhere and began spinning.
Thanks you very much.
Dati.MCAD
Alex,
I said at least 2 because I checked just before replying and saw 2 - one under activex\activex controls - "Play an AVI file in an ActiveX control" and other under windows API - "Play multimedia files using MCI commands":)
For what it's worth I have been using activex one since VFP5 days. I accept samples are not very instructional and more geared towards to 'seasoned developers', strange. It should be helpfull to beginners but I doubt how they could benefit from them - for one to understand they should already know how all these OOP works - maybe just a show up of what you can do rather than how to with VFP. For example you say you didn't see any OLE or Activex stuff but there are many.
As per the m. "m" is the alias for "memory" and putting that in front of a memory variable you're explicitly telling foxpro that it is a memory variable. If you do not:
1) If a table is open and there is a field with same name it takes precedence and the result is a bug that is hard to catch.
q: Given below code piece is the result always .T.
first_Name = "Alex"
( first_Name == "Alex" )
a: FALSE
Sample:
use _samples+'data\employee'
first_Name = "Alex"
m.first_Name, first_Name
2) Without m. VFP initially doesn't know what you're referring to and need to make sure it's not a field variable in the table open in current workarea. This causes a overhead and since VFP7 it is no more handled in a smart way causing a performance degradation in a loop.
These 2 primary reasons are enough to make m. mandatory in my opinion.
DotSlashMartyn
Tamar, thanks. This is what happening.
First I have used the Task Pane sporadically and was looking for samples in there on occasions. I work on two computers, one at the office, second one home. I am not in production of anything. My primary occupation lies elsewhere but I do programming so support my professional activities aside from the fact that I like it.
It turns out at home Win2K the Task Pane is OK but here at work where I spend most of my day I get an error:
0: Class definition MSXML2.DOMDOCUMENT.4.0 is not found.
I tried many tricks to set msXml2.lib up with SET CLASSLIB and via Tools=>Options but to no avail.
Need your help.
Thanks.
Yuval Gatenio
Alex,
While you're reading other:) go to VFP9 tools\task pane. Click more panes (chevron) and check solution samples. There at least 2 samples for playing media.
Now I don't know what O_videoplayer1 control is I would just follow general troubleshooting with that message:
"No parameter statement found" tells that you called a routine with parameters but that routine is not expecting any parameters. There are 2 places in your code that you use parameters:
1) JUSTSTEM (JUSTFNAME (cLine))
I know it's not this one because both JustFname and JustStem expect a character parameter. By the way reulst is the same as directly saying:
JustStem( m.cLine )
Please do not drop m. :)
2) THISFORM.O_VIDEOPLAYER1.playvideo (cFileName,100,100)
It should be this one. Does PlayVideo() method of that object really expect a parameter