Problem on Windows XP

.NET Edition of the F-IN-BOX
amey2009
Posts: 9
Joined: Tue May 05, 2009 1:16 pm

Problem on Windows XP

Postby amey2009 » Thu May 14, 2009 10:06 am

Hi,
I am using f_in_box__lib.dll.
I have created application which uses the above mention lib file. Its works fine on Win 2003 server, but when i execute it on Win XP, there is some problem.

After debugging the application i found out the following :

(On a button click i load the video into FlashVideoPlayer. At this point of time video is not playing)
f_in_box__control1.FlashProperty_FlashVars = @"type_video=flv&url=http://FLV/FlashVideo.flv";
f_in_box__control1.PutMovieFromStream(ms);
f_in_box__control1.FlashMethod_CallFunction("<invoke name=\"hideAllControl\" returntype=\"void\"><arguments></arguments></invoke>");

There is a Timer control used in which i have this code :
// when video is loaded, 'FlashProperty_FrameNum' value is 0
if (f_in_box__control1.FlashProperty_FrameNum != -1)
{
// on this line there is a problem
// on windows 2003 server, i get strXMLPosition = "<Number>0</Number>" where as on windows xp i get value as "". (empty)
string strXMLPosition = f_in_box__control1.FlashMethod_CallFunction("<invoke name=\"getCurrPosition\" returntype=\"xml\"><arguments></arguments></invoke>");

XmlDocument doc = new XmlDocument();
doc.LoadXml(strXMLPosition);
System.Globalization.NumberFormatInfo NumberFormatInfo = new System.Globalization.NumberFormatInfo();
NumberFormatInfo.NumberDecimalSeparator = ".";
float Position = float.Parse(doc.DocumentElement.InnerText, NumberFormatInfo);
string time = "";
if (-1 != Position)
{
...
}
...
}


Waiting for the reply

Thank You

Amey

Softanics
Site Admin
Posts: 1402
Joined: Sat Sep 18, 2004 3:03 am
Location: Russia, St. Petersburg
Contact:

Postby Softanics » Thu May 14, 2009 10:15 am

Thank you for your question.

The same versions of Flash ActiveX installed on this computers?

Thank you.
Best regards, Artem A. Razin,
F-IN-BOX support
Ask your question here: http://www.f-in-box.com/support.html

amey2009
Posts: 9
Joined: Tue May 05, 2009 1:16 pm

Postby amey2009 » Fri May 15, 2009 5:52 am

Hi
As i am never worked with flash activex, i am bit confused. Please let me know :

1. how to check the flash versions?

2. What if Falsh versions are different?

2. If i want to deploy my application on clients machine which does not have Flash ActiveX installed, then how should i install it?

Thank you

Softanics
Site Admin
Posts: 1402
Joined: Sat Sep 18, 2004 3:03 am
Location: Russia, St. Petersburg
Contact:

Postby Softanics » Fri May 15, 2009 6:55 am

amey2009 wrote:1. how to check the flash versions?


Use FPC_GetVersion:

http://www.f-in-box.com/dll/help/index/ ... rsion.html

Or open regedit and follow this path:
HKEY_CLASSES_ROOT\CLSID\{D27CDB6E-AE6D-11cf-96B8-444553540000}\InprocServer32
The default value is something like
C:\WINDOWS\system32\Macromed\Flash\Flash10b.ocx

Then launch Windows Explorer, find this file, right-click and open properties, then find the tab "version", you will see something like:
10.0.22.87

amey2009 wrote:2. What if Falsh versions are different?


Some things may work differently.

amey2009 wrote:2. If i want to deploy my application on clients machine which does not have Flash ActiveX installed, then how should i install it?


Open http://get.adobe.com/flashplayer/ with Internet Explorer,

or download this installer and include into your installer,

or embed flash ocx into your application:
http://www.f-in-box.com/dll/help/index/ ... emory.html

Thank you.
Best regards, Artem A. Razin,

F-IN-BOX support

Ask your question here: http://www.f-in-box.com/support.html

amey2009
Posts: 9
Joined: Tue May 05, 2009 1:16 pm

Postby amey2009 » Fri May 15, 2009 9:48 am

Hi

I would like to embed flash ocx into my application.
I am developing application using C# .Net. So please let me know how to do it.

Thank you

Amey

Softanics
Site Admin
Posts: 1402
Joined: Sat Sep 18, 2004 3:03 am
Location: Russia, St. Petersburg
Contact:

Postby Softanics » Fri May 15, 2009 11:20 am

amey2009 wrote:I would like to embed flash ocx into my application.
I am developing application using C# .Net. So please let me know how to do it.


Please review sample #3 from the f-in-box demo.

Thank you.
Best regards, Artem A. Razin,

F-IN-BOX support

Ask your question here: http://www.f-in-box.com/support.html

amey2009
Posts: 9
Joined: Tue May 05, 2009 1:16 pm

Postby amey2009 » Sat May 16, 2009 7:14 am

I referred to Sample 3. And following is my code.

Flv is not playing.

private void Form1_Load(object sender, EventArgs e){

byte[] bytes = File.ReadAllBytes(@"flash.ocx");
System.IO.Stream StreamWithFlashOCXCode = new MemoryStream(bytes);
if (StreamWithFlashOCXCode == null)
{
System.Windows.Forms.MessageBox.Show("Resource 'Flash.ocx' not found");
return;
}
f_in_box__lib.AxCode code = new f_in_box__lib.AxCode(StreamWithFlashOCXCode);
f_in_box__control1 = new f_in_box__lib.f_in_box__control(code);

Controls.Add(f_in_box__control1);

f_in_box__control1.Location = new Point(12, 74);
f_in_box__control1.Size = new Size(242, 200);

f_in_box__control1.BackColor = Color.Black;
f_in_box__control1.Visible = true;

....
}

Then on a button click :

private void button_Click(object sender, EventArgs e){

....
f_in_box__control1.FlashProperty_FlashVars = @"type_video=flv&url=http://FLV/FlashVideo.flv");
f_in_box__control1.PutMovieFromStream(this.GetType().Assembly.GetManifestResourceStream("MyApp.res.FlashVideoPlayer.swf"));
f_in_box__control1.FlashMethod_CallFunction("<invoke name=\"hideAllControl\" returntype=\"void\"><arguments></arguments></invoke>");

Stream FromStream = this.GetType().Assembly.GetManifestResourceStream("MyApp.res.flashvideo.flv");
ContentProvider ContentProvider =
new ContentProvider(f_in_box__control1.AxCode, FromStream);

....
}

Softanics
Site Admin
Posts: 1402
Joined: Sat Sep 18, 2004 3:03 am
Location: Russia, St. Petersburg
Contact:

Postby Softanics » Sat May 16, 2009 9:55 am

What version of this flash.ocx ?

Thank you.
Best regards, Artem A. Razin,

F-IN-BOX support

Ask your question here: http://www.f-in-box.com/support.html

amey2009
Posts: 9
Joined: Tue May 05, 2009 1:16 pm

Postby amey2009 » Mon May 18, 2009 4:44 am

HI

In my system32 folder, there is swflash.ocx which has vesion 5.0.42.0

and in C:\\Windows\system32\Macromed\Flash\ there is Flash9e which has
9.0.115.0 as its version

Thank you

Regards

Amey

Softanics
Site Admin
Posts: 1402
Joined: Sat Sep 18, 2004 3:03 am
Location: Russia, St. Petersburg
Contact:

Postby Softanics » Mon May 18, 2009 5:58 pm

I mean the version of flash.ocx from this line:

Code: Select all

byte[] bytes = File.ReadAllBytes(@"flash.ocx");


Thank you.
Best regards, Artem A. Razin,

F-IN-BOX support

Ask your question here: http://www.f-in-box.com/support.html

amey2009
Posts: 9
Joined: Tue May 05, 2009 1:16 pm

Postby amey2009 » Mon May 18, 2009 6:13 pm

Hi

I think its working now.

Just let me know whether this is ok or not:

I have used Flash9E.ocx from C:\\Windows\system32\Macromed\Flash\
and stored it in my application's Resources section.
Now when the form loads i load this ocx from resources,
then on button click i have written another code for loading FlashVideoPlayer.swf and Flv file.

Thank you

Regards

Amey

Softanics
Site Admin
Posts: 1402
Joined: Sat Sep 18, 2004 3:03 am
Location: Russia, St. Petersburg
Contact:

Postby Softanics » Mon May 18, 2009 6:16 pm

ok, good news!
Best regards, Artem A. Razin,

F-IN-BOX support

Ask your question here: http://www.f-in-box.com/support.html


Return to “.NET Edition”

Who is online

Users browsing this forum: No registered users and 22 guests

cron