Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

using com/activex in jscript .net app? AxShockwaveFlash

37 views
Skip to first unread message

Jarrad Hope

unread,
May 8, 2006, 3:52:31 AM5/8/06
to
I was wondering if anyone knew how I could reference and use
AxShockwaveFlashObjects.AxShockwaveFlash in my system.windows.forms ??

I have tried looking at c#/j#//Vb# code generated by vs2003.net
but I get stuck trying to figure out what datatype
AxShockwaveFlashObjects.AxShockwaveFlash is??

i tried private var swf:AxShockwaveFlashObjects.AxShockwaveFlash;
with no luck...

I cant find any documentation on it anywhere on the internet,
please help!

--
Jarrad Hope
jhope [a.t] lungshrimp , com

Jarrad Hope

unread,
May 8, 2006, 6:16:37 AM5/8/06
to
import System;
import System.Windows.Forms;
import System.ComponentModel;
import System.Drawing;
import System.IO

public class swfWindow extends System.Windows.Forms.Form {
private var mrSwf : Object;
//private var btnProgressControl : System.Windows.Forms.Button;

function swfWindow() {
this.mrSwf = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
/*print(mrSwf.FlashVersion());
mrSwf.Enabled = true;
mrSwf.Location = new System.Drawing.Point(96,40);
mrSwf.Size = new System.Drawing.Size(192,192);
mrSwf.Name = "mrSwf";
mrSwf.TabIndex = 0;
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(288, 198);*/
//this.Controls.Add(mrSwf);
//mrSwf.Movie=System.IO.Path.Combine(Directory.GetCurrentDirectory(),"test.swf");
// mrSwf.RegisterCallback("echo",new DgEcho(Echo));
this.Controls.Add(this.mrSwf); // <- causes crash?
}

}


var window : swfWindow = new swfWindow();
window.ShowDialog();

Peter Torr (MS)

unread,
May 9, 2006, 1:02:16 AM5/9/06
to
"Jarrad Hope" <jh...@lungshrimp.com> wrote in message
news:op.s872t...@jarrofjam.autumncare.com.au...

>I was wondering if anyone knew how I could reference and use
> AxShockwaveFlashObjects.AxShockwaveFlash in my system.windows.forms ??
>
> I have tried looking at c#/j#//Vb# code generated by vs2003.net
> but I get stuck trying to figure out what datatype
> AxShockwaveFlashObjects.AxShockwaveFlash is??

If you use the ActiveXObject constructor, you will get back a loosely-typed
object.

If you want a strongly-typed object, you should use the AXImp command-line
tool to generate a wrapper for you.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cptools/html/cpgrfWindowsFormsActiveXControlImporterAximpexe.asp

Peter

--
Peter Torr - http://blogs.msdn.com/ptorr
HD DVD Program Manager


Jarrad Hope

unread,
May 9, 2006, 6:23:55 AM5/9/06
to
Thanks peter worked like a charm! :D

asdf

unread,
May 19, 2006, 3:21:14 AM5/19/06
to
"new System.Drawing.Point(96,40);"
 
Yuup
 
 
That will be the day.
 
Back to elementary school
 
***********************************
 
I've got a box of crayons to sell you.
 
 
 
 
 
 
"Peter Torr (MS)" <pt...@microsoft.com> wrote in message news:e0dR8Wyc...@TK2MSFTNGP03.phx.gbl...
0 new messages